Created
June 6, 2017 09:20
-
-
Save YasinPatel/d3e865dbb9ebb0b29420448ae242df1b to your computer and use it in GitHub Desktop.
Mail setting in Yii2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SMTP settings to send mail in yii2 | |
'mailer' => [ | |
'class' => 'yii\swiftmailer\Mailer', | |
// 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. | |
'useFileTransport' => false, | |
'transport' => [ | |
'class' => 'Swift_SmtpTransport', | |
'host' => 'smtp.gmail.com', | |
'username' => '[email protected]', | |
'password' => '******', // email account password | |
'port' => '587', | |
'encryption' => 'tls', | |
], | |
], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment