Hi I'm making a web application and need to send some e-mails. I'm using Laravel 5.6, and make the e-mail feature at localhost using Mailtrap to test it, worked fine. But when I put it on the server I got a weird error, like in the picture bellow.
I've configured the system to my host, Hostinger settings.
This is the config code in the .env file
MAIL_DRIVER=smtp
MAIL_HOST=mx1.hostinger.com.br
MAIL_PORT=587
MAIL_USERNAME=E_MAIL_HERE
MAIL_PASSWORD=PASSWORD_HERE
MAIL_ENCRYPTION=null
I have faced the same issue.
Basically, I changed config/mail.php
variable MAIL_FROM_ADDRESS
to my actual email and it worked.
Code 354 is actually what Laravel expects, is not an error code. This is the SMTP server telling Laravel to proceed and send the body of the email. Note that this is what is expected, and not what you received.
Code 554 from a mail server indicates: "Transaction Failed", and you'll note that this is what you actually got.
The reason this is failing is indicated further in the message: Error: no valid recipients.
Without further data I can't tell why the recipient isn't set properly on your production server.
A more complete list of codes can be found here: https://www.greenend.org.uk/rjk/tech/smtpreplies.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With