chaplean/mailer-bundle

包含用于邮件发送的实用工具

安装次数: 3,205

依赖项: 1

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

v5.0.0 2018-03-26 15:43 UTC

README

先决条件

此版本的包需要 Symfony 2.8 或更高版本。

安装

1. Composer

composer require chaplean/mailer-bundle

2. 注册包

AppKernel 中添加

new Chaplean\Bundle\MailerBundle\ChapleanMailerBundle(),

3. 配置

config.yml 中包含配置

chaplean_mailer:
    bcc_address: '<email_reference>'
    bounce_address: '<email_reference>'
    sender_address: '<no_reply_email>'
    sender_name: '<sender_name>'
    subject:
        prefix: '<prefix>'
    test: false
    disabled_email_extensions: ['<domain>'] # default empty
    amazon_tags: # optional, add amazon tag in header message
        configuration_set: <> # required, use in X-SES-CONFIGURATION-SET
        project_name: <project_name> # required, use in X-SES-MESSAGE-TAGS
        env: <environement> # required, use in X-SES-MESSAGE-TAGS
注意:

SwiftmailerBundle 的配置已被此包包含

# Swiftmailer Configuration
swiftmailer:
    transport:  '%mailer_transport%'
    host:       '%mailer_host%'
    port:       '%mailer_port%'
    username:   '%mailer_user%'
    password:   '%mailer_password%'
    encryption: '%mailer_encryption%'
    spool:      { type: memory }