P.S. I am doing all of this testing on my local machine.I have tested my smtp settings with this online website https://www.smtper.net/. 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 unavailable550 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}"
3
Answers
This configuration is working well on my environment. Please try like this.
"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?
Make sure that the sender email is valid. By that I mean if the provider of your sender email exist.