Skip to content

Hyingerrr/hymailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

hymailer

Asynchronous mail delivery queue by HY

Installation

The preferred way to install this extension is through composer.

run

php composer.phar require --prefer-dist hymailer/mailerqueue

to the require section of your composer.json.

Configuration

To use this extension, you have to configure the Connection class in your application configuration:

return [ //....

'components' => [
    'mailer' => [

        // 'class' => 'yii\swiftmailer\Mailer',
        // 指向自定义的扩展类名(继承yii\swiftmailer\Mailer) 加载时无法识别自定义的目录 需要在前面alias声明

        'class' => 'hymailer\mailqueue\QueueMailer',

        // send all mails to a file by default. You have to set
        // 'useFileTransport' to false and configure a transport
        // for the mailer to send real emails.

        'db'  => '1', //redis默认有16个库,这里选择入第2个库
        'key' => 'mails',  //redis键名
        'useFileTransport' => false,
        'transport' => [
            'class' => 'Swift_SmtpTransport',
            'host' => 'smtp.163.com',
            'username' => '[email protected]',
            'password' => 'imooc123',
            'port' => '465',
            'encryption' => 'ssl',
        ],
    ],
]

];

About

Asynchronous mail delivery queue by HY

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages