weew/app-swift-mailer
Composer 安装命令:
composer require weew/app-swift-mailer
包简介
Integration of the swiftmailer/swiftmailer into the weew/app package.
README 文档
README
Table of contents
Installation
composer require weew/app-swift-mailer
Introduction
This package integrates the swiftmailer/swiftmailer library into the weew/app package.
Usage
To make SwiftMailer available inside your application, simply register SwiftMailerProvider on the kernel.
$app->getKernel()->addProviders([ SwiftMailerProvider::class ]);
You can retrieve a specific mailer by config name like this:
$swiftMailerManager = $app->getContainer()->get(ISwiftMailerManager::class); // returns the default mailer $swiftMailerManager->getMailer(); // returns a mailer using the specific config $swiftMailerManager->getMailer('config1');
Example config
Currently supported transports are null, sendmail, smtp. This is how your configuration might look like:
swift_mailer: transports: # this is the default transport that is used in case no # mailer config name has been specified default: "{swift_mailer.transports.config2}" config1: type: smtp # server settings host: localhost port: 25 security: tls # server username and password username: password: config2: type: sendmail # override for the used sendmail command command:
统计信息
- 总下载量: 83
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-21