Answer the question
In order to leave comments, you need to log in
Not sending mail with SwiftMailer via ZohoMail, what's the error?
Hello!
There is an application on Yii2, on a test (local) server c Mail normally goes to runtime / mail
On the working server, I use the service from Zoho as SMTP ( https://www.zoho.eu/mail/)
The problem is as follows:
The controller sends two letters one after the other (to the user and the manager), with the current settings, the first letter arrives, the second does not, and in debug I get a Swift_TransportException Expected response code 250 but got code "553", with message "553 Relaying disallowed as The config is as
follows:useFileTransport' => true,
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => false,
'messageConfig' => [
'charset' => 'UTF-8',
'from' => '[email protected]'
],
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.zoho.eu',
'username' => '[email protected]',
'password' => 'password',
'port' => '465',
'encryption' => 'ssl',
],
],
//отправка письма юзеру
Yii::$app->mailer->compose('order_user', ['session' => $session, 'order' => $order])
->setFrom('info.domain.com'=>'Рога и Копыта'])
->setTo($order->email)
->setSubject('Заказ № '.$order->id.' на сайте Рога и Копыта')
->send();
//отправка письма менеджеру
Yii::$app->mailer->compose('order_manager', ['session' => $session, 'order' => $order])
->setFrom([$order->email => $order->name])
->setTo('[email protected]')
->setSubject('Новый заказ - № '.$order->id)
->send();
Answer the question
In order to leave comments, you need to log in
Got an error? Paste it into the search, most likely you are not the first:
Yasha
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question