I can\'t finally understand how to use the swiftMailer extension in Yii2. Judging by that on this subject I didn\'t find questions, the task is trivial, but up to the end I
Sometimes could be issues with using SwiftMailer not dependent from you. Like when I used mail.ru e-mail server. I found solution in laravel community and implemend in Yii2.
You can use alternative service like https://mandrillapp.com/ (12k email per month, 250 within hour is free) and setting up like below:
laravel community / setup mail with mandrill
'host' => 'smtp.mandrillapp.com',
'username' => 'user@domain.name',
'password' => 'oDLKswXZIkry8634f1jCDg', // new generated API key by mandrill
'port' => '587',
'encryption' => 'tls',
If you are using gmail email you can also can face with security issue. You can swith off security by allowing application use your gmail account.
If you signed in with google use links below:
https://www.google.com/settings/security/lesssecureapps
Hope it will help somebody