R
R
Ruslan Absalyamov2018-08-26 11:45:05
Laravel
Ruslan Absalyamov, 2018-08-26 11:45:05

Why is my mail not authorized when sending smtp?

I am using smtp yandex. Since I have two-factor authentication in the mail, I created a password for the mail application, copied the password and pasted it into .env. And it turned out that the .env file became like this

MAIL_DRIVER=smtp
MAIL_HOST=smtp.yandex.ru
MAIL_PORT=465
MAIL_USERNAME=absaruslan9
MAIL_PASSWORD=password_application
MAIL_ENCRYPTION=ssl

And in my logs it says
local.ERROR: Expected response code 250 but got code "553", with message "553 5.7.1 Sender address rejected: not owned by auth user.
" {"exception":"[object] (Swift_TransportException(code: 553): Expected response code 250 but got code \"553\", with message \"553 5.7.1 Sender address rejected: not owned by auth user.
\" at /home/ruslan/Разработка/latina/admin/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:456)
[stacktrace]

I don’t understand what he doesn’t like, everything seems to be working fine.
At the same time, on pure php without a framework on phpMailer, I connected like this
private $login = '[email protected]';
    private $password = '***********';
    private $secure = 'ssl';
    private $port = '465';
    private $host = 'smtp.yandex.ru';
    private $auth = true;

And everything went fine. And in laravel, I have no idea why this happens

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2018-08-26
@rusline18

upd: issue in https://github.com/laravel/laravel/blob/master/con...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question