eschmar/mailer-bundle
最新稳定版本:v1.0.1
Composer 安装命令:
composer require eschmar/mailer-bundle
包简介
Conveniently send html/plaintext emails in Symfony 4.
README 文档
README
Conveniently send html/plaintext emails in Symfony4. This bundle ships with a version of Mailgun's Action Email ready to send emails.
Installation
Composer (Packagist):
composer require eschmar/mailer-bundle ^1.0.0
Usage
The eschmar_mailer service expects templates to have the 3 blocks subject, body_html and body_plain and already includes a layout file @EschmarMailer/Mail/layout.html.twig ready to go. I do not recommend using embedded base64 images, this is just for demo purposes. Of course this layout is entirely optional, you may build your own templates. Using the Twig tag {% cssinline %}{% endcssinline %}, CSS styles are inlined (some email clients strip out <head> and <style> tags).
use Eschmar\MailerBundle\Service\Mailer; // ... if (!$mailer->send("@EschmarMailer/Mail/test.html.twig", [], $from, $to[, $bcc])) { // Oops! return; } // success
License
MIT License.
统计信息
- 总下载量: 248
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-24
