I am having problems sending emails using Yii2´s swiftmailer. I have tried using SMTP as well as PHP as transport, neither seem to be sending the emails.
I tried configuring swiftmailer according to the d0x: http://www.yiiframework.com/doc-2.0/yii-swiftmailer-mailer.html
'components' => [ ... 'mail' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPath' => '@common/mail', 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => 'mail.server.com', 'username' => 'myUsername', 'password' => 'myPassword', 'port' => '587', ], ], ],
Some important details to note:
These SMTP credentials work fine using swiftmailer with Yii 1.
According to the d0x, when I uncomment the transport property in my config, the default mail() function should be used. Mails are however still not being sent/received.
According to the Yii Debugger, the email is successfully sent (see attached image)
If I simply use php’s mail() function myself (without using swiftmailer), the email is sent and received fine.
Can anybody please help me out? I’m a noob and I havn’t the foggiest what to try.