Reputation: 45
I cannot send the password reset link in the email with the error:
Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required
I have followed this video tutorial but still I could not solve the problem.
.env file
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=52ca17394c74f6
MAIL_PASSWORD=e89831236006c1
MAIL_ENCRYPTION=tls
mail.php
<?php
return [
'driver' => env('MAIL_DRIVER', 'smtp'),
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'from' => [
'address' => '[email protected]',
'name' => 'Example',
],
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'sendmail' => '/usr/sbin/sendmail -bs',
];
Upvotes: 0
Views: 433
Reputation: 11906
The mailtrap host is smtp.mailtrap.io and that's not what your .env file has. Also when you make changes to .env file, you should clear the config since it might be cached. You can clear it by running php artisan config:clear
Upvotes: 1