tss/automailer-bundle
Composer 安装命令:
composer require tss/automailer-bundle
包简介
Adds Doctrine spool to Swiftmailer
README 文档
README
Swiftmailer Spool for Doctrine packaged into a Symfony2 Bundle
Installation instructions:
- Easiest way to install is via composer, add those lines to
./composer.json:
"require": {
...
"tss/automailer-bundle": "dev-master"
}
and then run composer.phar install
- Then enable the bundle in
./app/AppKernel.php:
public function registerBundles()
{
$bundles = [
...
new TSS\AutomailerBundle\TSSAutomailerBundle(),
];
}
- Change Swiftmailer spool type in
./app/config.yml:
swiftmailer:
...
spool: { type: automailer }
- Update your db with Bundle's entity:
app/console doctrine:schema:update --force
Set a cron to execute the queue:
app/console automailer:spool:send
You can also test the spool by adding a new email with:
app/console automailer:test --email=info@trisoft.ro
Automailer has also a Beanstalk integration feature, which uses pheanstalk to send a job with automailer:spool:send to a queue/tube. This feature is activated automatically once a new email is sent through mailer, if pheanstalk is installed and if you add this inside ./app/config.yml:
tss_automailer:
beanstalk: true
You can also customize the entity manager:
tss_automailer:
manager: doctrine_mongodb.odm.document_manager
class: TSS\AutomailerBundle\DefaultDocument\Automailer
You can easily customize the class used for the entity or document by simply configuring the class in config.yml and disabling the relevant functionality like this:
tss_automailer:
class: AppBundle\Entity\Automailer # or AppBundle\Document\Automailer, your specific path to your entity or document
disable_default_document: true # disables the default document so that you can use your own
disable_default_entity: true # disables the default entity so that you can use your own
In order to customize the entity or document that you wish to use with your own functionality, you can do so by extending TSS\Automailer\Model\Automailer and adding the relevant @ODM\Document() or @ORM\Entity() annotation to your class.
Enjoy :)
统计信息
- 总下载量: 44.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-07-16