Good afternoon, I ask you to kick on the desired material or thought. The subject is such that the site is hosted and settings are configured according to the documentation of the host. The paradox is that when using the usual php mail () function, the message is sent perfectly, and when using swiftmailer, a 500 error. Settings:
'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPath' => '@common/mail', 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => 'p123456.mail.ihc.ru', 'username' => 'support@eurasiatt.com', 'password' => '*********', 'port' => '465', 'encryption' => 'tls', ], 'useFileTransport' => false, ], Controller:
Yii::$app->mailer->compose() ->setTo('mymail@gmail.com') ->setSubject('Тема сообщения') ->setTextBody('Текст сообщения') ->setHtmlBody('<b>текст сообщения в формате HTML</b>') ->send();