定制 martijngastkemper/swiftmailer-transport-aws-ses 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

martijngastkemper/swiftmailer-transport-aws-ses

最新稳定版本:0.9.2

Composer 安装命令:

composer require martijngastkemper/swiftmailer-transport-aws-ses

包简介

Add AWS SES support to Swiftmailer

README 文档

README

It's a simple transport for use with Swiftmailer to send mail over AWS SES.

As on December 2011, Amazon provides an SMTP interface to SES, so you may prefer to use Swiftmailer's built in SMTP transport.

Where do I put it?

Whereever you want, so long as you include it in your code.

Otherwise Swift can autoload it if you put the files in this directory:

[swift library root]/classes/Swift/AWSTransport.php

How do I use it?

Like any other Swiftmailer transport:

//Create the Transport
$transport = Swift_AWSTransport::newInstance( 'AWS_ACCESS_KEY', 'AWS_SECRET_KEY' );

//Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);

$mailer->send($message);

Symfony1.X configuration

```yaml
# app/frontend/config/factories.yml

all:
  mailer:
    class: sfMailer
    param:
      transport:
        class:          Swift_AWSTransport
        accessKeyId:    your-access-key
        secretKey:      Y0uR-$3cr3t5-k3y
        debug:          false
        endpoint:       'https://email.us-east-1.amazonaws.com/' # make sure to use trailing slash !
```

How do I get the message ID on send?

You need to register the Swift_Events_ResponseReceivedListener plugin with a callback. See example/responseListener.php for details.

$transport->registerPlugin(
	new Swift_Events_ResponseReceivedListener( function ( $message, $body ) {
		echo sprintf( "Message-ID %s.\n", $body->SendRawEmailResult->MessageId );
	})
);

Swiftmailer Version

Please note that some users have had issues with older versions of Swiftmailer.

Versions 4.1.3 and up should work fine.

Credits

  • @jmhobbs - Original development
  • @bertrandom - Bug fix
  • @themouette - Plugins & Symfony compatible
  • @jonatrey & @faz - Debugging and Testing issue #13
  • @casconed - Made debug function more robust, issue #21
  • @martijngastkemper - Added responseReceived event to get message id from AWS

统计信息

  • 总下载量: 102
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 36
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固