M4verick's avatar

Failed to send email: Expected response code "250/251/252"

Hello everyone , I am facing a problem with sending an email from my laravel app. When i test it locally , it works perfectly . but in production it throws me this error :

Failed to send email: Expected response code "250/251/252" but got code "554", with message "554 5.7.1 <[email protected]>: Recipient address rejected: Sender is not same as SMTP authenticate username".

This is my .env file configuration :

MAIL_MAILER=smtp
MAIL_HOST=myhost
MAIL_PORT=465
MAIL_ENCRYPTION=tls
[email protected]
MAIL_PASSWORD=mypassword
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

Can anyone give me an idea. Thanks in advance .

0 likes
5 replies
tisuchi's avatar

@M4verick So, if I understand correctly, your email belongs to ...@mail.com domain.

And you are trying to send email from your mail.com domain, correct?

M4verick's avatar

@tisuchi No . I am sorry if i do not understand correctly your question , but the real domain its not @mail.com . It's completly another domain and as i said it works in my local enviroment.

tisuchi's avatar

@M4verick I see!

I assume you provided the error from the production.

Failed to send email: Expected response code "250/251/252" but got code "554", with message "554 5.7.1 [email protected]: Recipient address rejected: Sender is not same as SMTP authenticate username".

This means, you logged in with one email, and trying to send email from another email address.

Please or to participate in this conversation.