stampie / stampie-bundle
此捆绑包提供了对 Stampie 邮件库的集成
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