Expected response code 250 but got code "", with message ""
Solution 1
looks like the smtp was blocked for hostinger free users.
http://www.hostinger.ph/forum/news-and-announcements/229-email-service-updates-1.html
Solution 2
I ran through this error so many times for some reasons.
When see this error,
Expected response code 250 but got code “”, with message “”
Please triple check your email password.
Note :
Test your credentals first on a phone app or log-in into the mail site.
If pass, you may update in your .env
file
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mail.yahoo.com
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=****
If you know for sure that your password is correct.
Check to make sure your Gmail or Yahoo Mail allow app log-in.
Example
Yahoo
Solution 3
we solved this problem by clearing the Laravel's configuration cache
php artisan config:clear
Solution 4
This one worked for me, 'if you are using GMAIL'
- Go to 'My Accounts'
- Go to 'Sign-in & security'
- Scroll down to 'Allow less secure apps'
- Switch #3 to ON
After doing this and if you just recently set up your email configurations on laravel and still doesn't work, try running:
php artisan config:cache
Solution 5
FWIW - I get this error when sending a email with an empty string in the to
field.
Related videos on Youtube
Primecore
Updated on April 28, 2021Comments
-
Primecore about 3 years
I can send my emails in localhost flawlessly. but ever since I uploaded my program into a hosting site I get this error
Expected response code 250 but got code "", with message ""
I also updated the
.env
file.MAIL_DRIVER=smtp MAIL_HOST=smtp-mail.outlook.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=123456789
works in localhost but not in the hosting site.
i am using laravel 5
-
Kalle almost 9 yearsWhat is this program you have uploaded? What steps have you taken? Where does the error occur? If we have more information it will be easier to help you.
-
Blaatpraat almost 9 yearsWhat hosting company are you using? More likely this is because your hosting company blocks outgoing traffic on 587.
-
Primecore almost 9 years@silverskin its a personal website. this page acts as contact us page. i didn't touch the mail.php anymore because it is working well in my localhost. so i assumed that it will do its job ones i've uploaded it.
-
Primecore almost 9 years@Blaatpraat hostinger. i'm just using free domain and hosting. i am just testing it if it will work IRL. i am using my personal e-mail to receive the message
-
-
hhsadiq almost 9 years@Primercore its always good practice to mark the answer which worked for you as an accepted answer. This way other users will have more confidence using this solution. I have noted you lately not marking some of your working answer as accepted. And you can also accept your own answer. Thanks for contributions to community.
-
JohnL over 6 yearsFixed it for us.
-
Renoir Reis over 6 yearsnice to hear it. Whenever i got stuck with laravel config problems i imediatly run
composer dump autoload
andphp artisan config:cache
, their are the best chances you have to start a problem solving on laravel. -
JohnL over 6 yearsAs it turned out, it was not a permanent fix. Ultimately I created a new Sendgrid account for that client which fixed issue - how I have no clue, but it did.
-
Renoir Reis over 6 yearshave you checked your Sendgrid's send limits? Based on what your are describing the problem seems to be related to Sendgrid not with Laravel or PHP.
-
Nuwan Withanage about 5 yearsThankz bro you saved my time