The following options are available:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.yandex.ru
MAIL_PORT=465
MAIL_USERNAME=username@testdomain.ru
MAIL_PASSWORD=user_password
MAIL_ENCRYPTION=ssl
When trying to send a message, the following error occurs:
503 5.5.4 Error: send AUTH command first.
I suspect that in the Swiftmailer you need to pass another parameter auth_mode = login.
But how to do this if there is no such parameter in the Laravel configuration file?
Share
It is necessary in the account settings, on Yandex (Yanex Passport):
1. fill in personal information
2. In the “Passwords and Authorization” block there is a block “Application Passwords” and the link “Create another” – create a new password there and use it in the Laravel config
It helped!
Right!
Env file
MAIL_DRIVER = smtp
MAIL_HOST = smtp.yandex.ru
MAIL_PORT = 465
MAIL_USERNAME=noreply@site.com
MAIL_PASSWORD = secret (new application password from Yandex passport)
MAIL_ENCRYPTION = ssl
In a config by default stand
laravel 5.7
I also suffered for a long time. And the answer above did not help.
Decided the next day radically.
Cut out all Mail settings from .env
And entered the following in config / mail.php:
The settings are the same for sending from Gmail.
thanks
@danlek Can you still help with my question – toster.ru
There was the same problem. The issue was resolved by adding the following lines to .env:
MAIL_FROM_ADDRESS=address_otpravitelya@exemple.com
MAIL_FROM_NAME = Sender_Name
Try 587
Try tls
Thanks ! And then they scored all of Google with all sorts of smarts
The same problem was. I decided as described above, I bring the full config in the .env file:
Then in the console command
php artisan config:cache
And just in case, I rebooted the server … Although most likely it was not necessary.