Hi everyone,
need kind guidance to setup mailer.
I am hosting with GoDaddy.
By referring this,
I enabled IMAP from google setting,
and below is my common/config/main-local.php
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// 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'=> 'mymail@gmail.com',
'password'=> 'mypassword',
'port'=> '587',
'encryption'=>'tls'
],
],
But I got this error:
Connection could not be established with host smtp.gmail.com [Connection refused #111]
What do I miss out?