bertoost/craft-ssmtpmailer
Composer 安装命令:
composer require bertoost/craft-ssmtpmailer
包简介
Craft 3 CMS plugin for adding the sSMTP mailer (sendmail replacement).
README 文档
README
This mailer for Craft CMS 3 is a simple replacement for Sendmail, using sSMTP.
More information about sSMTP can be found here
Install plugin
Use the Craft Plugin Store or use composer
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require bertoost/craft-ssmtpmailer # OR only for development # composer require bertoost/craft-ssmtpmailer --dev # tell Craft to install the plugin ./craft install/plugin ssmtpmailer
Executed command
This adaptor is using the Swiftmailer Sendmail Transport literally. It is extending it and just replaces the command to execute.
The next command is used for sSMTP to send your email.
/usr/sbin/ssmtp -t
Configure it for development only
Since Craft 3, you can use multi-environment config in every single configuration file in your config/ folder.
To setup this mailer only for dev-environment, you can change config/app.php in a multi-environment config and configure the sSMTP mailer for dev only.
return [ // general for every environment '*' => [ 'modules' => [ // ... ], 'bootstrap' => [ // ... ], ], // Staging environment settings 'staging' => [ // ... ], // Dev environment settings 'dev' => [ 'components' => [ 'mailer' => function() { // Get the stored email settings $settings = Craft::$app->getSystemSettings()->getEmailSettings(); $settings->transportType = bertoost\ssmtpmailer\mail\Ssmtp::class; $settings->transportSettings = []; return craft\helpers\MailerHelper::createMailer($settings); }, ], ], ];
统计信息
- 总下载量: 1.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-18