Добрый день,
Раньше все работало и тут резко перестало проверил пароли, но все равно пишет ошибку 500 при отправки почты в firebug. покажу свой код
web.php
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.mail.ru',
'username' => '######@bk.ru',
'password' => '#####',
'port' => '587',
'encryption' => 'tls',
],
],
Controller
Yii::$app->mailer->compose()
->setFrom('#####@bk.ru')
->setTo('###@gmail.com')
->setSubject('####.ru - Новый клиент - '.$name)
->setTextBody('Plain text content')
->setHtmlBody($body)
->send();
access.log
31.132.0.0 - - [29/Oct/2015:08:03:23 -0400] "POST /index.php?r=site/send-contact HTTP/1.1" 500 327 "http://#####.ru/" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/45.0.2454.101 Chrome/45.0$
и лог-приложения
2015-10-29 12:03:24 [31.132.176.118][-][-][error][Swift_TransportException] exception 'Swift_TransportException' with message 'Expected response code 250 but got code "550", with message "550 Message was not accepted -- invalid mailbox. $
"' in /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383
Stack trace:
#0 /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(281): Swift_Transport_AbstractSmtpTransport->_assertResponseCode('550 Message was...', Array)
#1 /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(243): Swift_Transport_AbstractSmtpTransport->executeCommand('\r\n.\r\n', Array, Array)
#2 /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(333): Swift_Transport_EsmtpTransport->executeCommand('\r\n.\r\n', Array)
#3 /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(428): Swift_Transport_AbstractSmtpTransport->_streamMessage(Object(Swift_Message))
#4 /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(444): Swift_Transport_AbstractSmtpTransport->_doMailTransaction(Object(Swift_Message), 'site@bk.r...', Array, Arra$
#5 /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(176): Swift_Transport_AbstractSmtpTransport->_sendTo(Object(Swift_Message), 'site@bk.r...', Array, Array)
#6 /home/git/projects/site/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(85): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#7 /home/git/projects/site//vendor/yiisoft/yii2-swiftmailer/Mailer.php(140): Swift_Mailer->send(Object(Swift_Message))
#8 /home/git/projects/site//vendor/yiisoft/yii2/mail/BaseMailer.php(260): yii\swiftmailer\Mailer->sendMessage(Object(yii\swiftmailer\Message))
#9 /home/git/projects/site//vendor/yiisoft/yii2/mail/BaseMessage.php(48): yii\mail\BaseMailer->send(Object(yii\swiftmailer\Message))
#10 /home/git/projects/site//controllers/SiteController.php(111): yii\mail\BaseMessage->send()
#11 [internal function]: app\controllers\SiteController->actionSendContact()
#12 /home/git/projects/site//vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#13 /home/git/projects/site//vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#14 /home/git/projects/site//vendor/yiisoft/yii2/base/Module.php(455): yii\base\Controller->runAction('send-contact', Array)
#15 /home/git/projects/site//vendor/yiisoft/yii2/web/Application.php(83): yii\base\Module->runAction('site/send-conta...', Array)
#16 /home/git/projects/site//vendor/yiisoft/yii2/base/Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))
#17 /home/git/projects/site//web/index.php(12): yii\base\Application->run()
#18 {main}
Надеюсь кто-нибудь подскажет, может htaccess надо? Может с apache2 что случилось, Никак не пойму. Спасибо всем поможет.