appventus / spoolmailerbundle
此包已废弃,不再维护。未建议替代包。
数据库缓存邮件
2.0.1
2018-03-07 10:41 UTC
Requires
- php: >=5.3.3
- appventus/swiftmailerdbbundle: ~1.0
- swiftmailer/swiftmailer: >=4.2.0
- symfony/swiftmailer-bridge: >=2.1.0
- symfony/swiftmailer-bundle: >=2.1.0
README
允许您将邮件存储为队列并发送事务性直接邮件,或将邮件存储在数据库中
- 安装
此包在Packagist上的地址为: https://packagist.org.cn/packages/appventus/spoolmailerbundle
- 配置
在您的config.yml中导入此配置: - { resource: @AvSpoolMailerBundle/Resources/config/config.yml }
始终在config.yml中,覆盖发件人邮件配置
av_awesome_spool_mailer:
contact_addresses:
admin:
address: [yours]
name: [yours]
noreply:
address: [yours]
name: [yours]
...
添加您的邮件地址,每行联系地址将自动在参数包中通过以下方案访问
示例
contact_addresses_**KEY**_address
- 用法
您可以使用以下方式在数据库中缓存消息:$this->get('spool_mailer')->queueMessage($message);
您可以在控制器中通过以下方式发送即时邮件:$this->get('instant_mailer')->send($message);
要发送缓存的消息,请调用:php app/console swiftmailer:spool:send