nyatmeat/mandrill-swiftmailer-bundle

Symfony 扩展包,提供 Mandrill SwiftMailer 服务

1.3.1 2018-12-28 09:12 UTC

This package is not auto-updated.

Last update: 2024-09-22 05:24:57 UTC


README

Build Status SensioLabsInsight

一个基于 Mandrill API 提供的 Mandrill 传输实现的 Symfony 扩展包

要求

Mandrill API 密钥 - https://mandrillapp.com/

安装

使用 composer 安装此包

composer require nyatmeat/mandrill-swiftmailer-bundle

将 AccordMandrillSwiftMailerBundle 添加到应用程序内核

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Accord\MandrillSwiftMailerBundle\AccordMandrillSwiftMailerBundle(),
        // ...
    );
}

在 config.yml 中添加您的 API 密钥

// app/config/config.yml
accord_mandrill_swift_mailer:
    api_key: MANDRILL_API_KEY
    async: false # optional
    subaccount: ~ # default null

配置 Swiftmailer 使用这个新的传输

// app/config/config.yml
swiftmailer:
    transport: accord_mandrill