Reputation: 197
I am trying to send emails using outlook mail server in my yii website. I have used the below configuration :
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.office365.com',
'username' => 'username',
'password' => 'password',
'port' => '587',
'encryption' => 'tls',
'streamOptions' => [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
],
],
],
'useFileTransport' => false,
]
Previously I was using pair server configuration instead of outlook and mail was sending properly. But when I replaced pairserver with outlook it stopped working. Can any one please tell if anything I am missing.
Upvotes: 0
Views: 110
Reputation: 2576
You need to make sure all of these conditions are met:
Upvotes: 0