Answer the question
In order to leave comments, you need to log in
Why do I get the error "Failed to authenticate to SMTP server" when sending email to Azure via Sendgrid?
At the moment, I have configured mail forwarding as suggested in the Azure reference documentation for the Sendgrid resource on a windows server 2012 virtual machine with iis8
Transport:
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.sendgrid.net',
'username' => 'ххххххх',
'password' => 'ххххххх',
'port' => '587',
'encryption' => 'tls',
],
if ( ! Yii :: $ app-> mailer
-> compose ('signup-ok', ['password' => $ password, 'user' => $ user])
-> setTo ($ user-> email)
-> setFrom ( [Yii :: $ app-> params ['fromEmail'] => 'XXXXXXX.ru'])
-> setSubject ('XXXXXXXXXXXX.ru')
-> send ()
) {
throw new \ DomainException ('Ошибка отправки сообщения « );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question