Expected response code 250 but got code "550", with message "550-Requested action not taken: mailbox unavailable 550 Sender address has null MX

P.S. I am doing all of this testing on my local machine.I have tested my smtp settings with this online website . Each one of below services are sending the emails.

I am trying to setup email confirmation system for my Laravel application and keep on getting this error with email created through cpanel.

I have tried using Gmail/mailtrap/mailosaur for testing with these settings and everything was working fine:

MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 [email protected] MAIL_PASSWORD='password' MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME="${APP_NAME}" MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=ab723b95067210 MAIL_PASSWORD=password MAIL_ENCRYPTION=tls MAIL_MAILER=smtp MAIL_HOST=mailosaur.net MAIL_PORT=2525 [email protected] MAIL_PASSWORD=password MAIL_ENCRYPTION=tls MAIL_FROM_NAME="${APP_NAME}" 

but now when I am using my custom email i am getting this error in my logs file:

[2021-12-26 09:17:53] local.ERROR: Expected response code 250 but got code "550", with message "550-Requested action not taken: mailbox unavailable 550 Sender address has null MX " {"exception":"[object] (Swift_TransportException(code: 550): Expected response code 250 but got code "550", with message "550-Requested action not taken: mailbox unavailable 550 Sender address has null MX

MAIL_MAILER=smtp MAIL_HOST=smtp.ionos.com MAIL_PORT=587 [email protected] MAIL_PASSWORD='password' MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME="${APP_NAME}" 
1

3 Answers

"mailbox unavailable 550 Sender address has null MX".

It seems your smtp server can't find the IP address of the receiving mail server. Are you sending to a valid email address? Have you set up a DNS MX record?

1

This configuration is working well on my environment. Please try like this.

MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=<your_username_goes_here> MAIL_PASSWORD=<your_password_goes_here> MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=<your_email_goes_here> MAIL_FROM_NAME="${APP_NAME}"` 
1

Make sure that the sender email is valid. By that I mean if the provider of your sender email exist.

Example of invalide email: [email protected]

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like