Answer the question
In order to leave comments, you need to log in
How to send email using another server in Yii2?
There is a domain.com domain, which is hosted on server No. 1. I'm trying to send an email, but through another domain - anotherdomain.com, which is hosted on server #2 .
I am getting an error:
Expected response code 354 but got code "503", with message "503-All RCPT commands were rejected with this error:
503-Temporary local problem - please try later
503 Valid RCPT command must precede DATA
"
'mailer' => [
'class' => Mailer::class,
'viewPath' => '@common/mail',
'useFileTransport' => false,
'messageConfig' => [
'charset' => 'UTF-8',
'from' => ['[email protected]' => 'SiteName'],
],
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'anotherdomain.loc',
'username' => '[email protected]',
'password' => 'somePassword95X',
#'port' => '465',
]
],
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