puz/mail_autoembed 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

puz/mail_autoembed

Composer 安装命令:

composer require puz/mail_autoembed

包简介

Automatically embed all image sources in your emails

README 文档

README

This package is mainly made for Laravel 5.2, but is fully useful for every application which uses Swift Mailer

To install: composer require puz/mail_autoembed

To use without laravel:

$mailer = new \Swift_Mailer;
$mailer->registerPlugin(new \Puz\Mail\AutoEmbed\ImagesToAttachments);

To use with laravel ^5.2:

// Add the service provider in the list of your service providers in app.php. It MUST be added after laravels mail service provider
$providers[
    ...
    \Puz\Mail\AutoEmbed\AutoEmbedServiceProvider::class,
    ...
 ];

This package will register two plugins to the mailer.

  • beforeSendPerformed
    • Right before the email is sent, it will scan the email for tags and it's src attribute. It will accept data:image, local image path and remote image
  • sendPerformed
    • Right after the mailer have sent the email away, it will go ahead and delete the temporary created images (for remote and data:image).

Contributions

Any suggestion or code improvement will be gladly accepted.

Future features

  • Save all the images which is attached. This can be useful in situations where the user send the email from a text editor and you need to display the email on your website as well. Good thing you saved the image right?!

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固