henrikbjorn / stampie-bundle
v2.1.1
2022-03-30 13:36 UTC
Requires
- php: ^7.2 || ^8.0
- stampie/stampie: ^1.0
- symfony/config: ^4.4.30 || ^5.3
- symfony/console: ^4.4.30 || ^5.3
- symfony/dependency-injection: ^4.4.31 || ^5.3
- symfony/framework-bundle: ^4.4.31 || ^5.3
- symfony/http-kernel: ^4.4.32 || ^5.3
Requires (Dev)
- guzzlehttp/psr7: ^1.4 || ^2.1
- nyholm/symfony-bundle-test: ^1.8.2
- php-http/curl-client: ^1.7 || ^2.2
- phpunit/phpunit: ^8.5.21 || ^9.5.10
- stampie/extra: ^1.0
- symfony/phpunit-bridge: ^5.3
Suggests
- php-http/httplug-bundle: for easier HTTP clients configuration
- stampie/extra: to have event-based hooks in the mailer
README
将 Stampie 与 Symfony 集成。
$ composer require stampie/stampie-bundle
用法
将 Stampie\StampieBundle\StampieBundle()
添加到 AppKernel.php
中的 registerBundles
方法。
按以下方式将配置添加到 config.yml
stampie: mailer: postmark # [send_grid, postmark, mailgun, mandrill, mailjet, spark_post] are supported server_token: POSTMARK_API_TEST # Replace with your ServerToken for your Service
此包使用的 HttpClient 可配置。默认情况下,它使用服务 httplug.client
,这是使用 HttplugBundle 时的默认 HTTP 客户端名称。使用此包是可选的。您可以选择提供自己的集成 HTTPlug 的服务。
stampie: http_client: my_http_client
StampieExtra
此包允许您轻松使用 StampieExtra:将额外库添加到您的项目中。集成将自动激活以包装邮件发送器并分发事件。还提供了一个与性能分析器的集成。
如果您想启用 ImpersonateListener 将所有邮件发送到同一地址,请提供一个非空投递地址。
stampie: extra: delivery_address: dev@example.com