Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
464 views
in Technique[技术] by (71.8m points)

php - Expected response code 250 but got code "", with message ""

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

MAIL_USERNAME=email@outlook.com

MAIL_PASSWORD=123456789

works in localhost but not in the hosting site.

i am using laravel 5

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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
MAIL_USERNAME=dev.bheng@yahoo.com
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

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...