承接 bertoost/craft-ssmtpmailer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固