mailtrap error { Expected response code 250 but got code "550", with message "550 5.7.1 Relaying denied " }

I deployed my app in heroku, it’s a simple laravel vue.js blog I’m still learning

The problem is in the contact page, when I send mail from the localhost everything work perfectly
but when I try to send the email from the website "http://scifiblog.herokuapp.com/" it give me this error

{ Expected response code 250 but got code "550", with message "550 5.7.1 Relaying denied "}

I don’t know where is the problem and i didn’t find a solution
Here is my .env :

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=***********
MAIL_PASSWORD=***********
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=test@test.com
MAIL_FROM_NAME="${APP_NAME}"

Can you help me please to fix this bug?

Thank you !

18 thoughts on “mailtrap error { Expected response code 250 but got code "550", with message "550 5.7.1 Relaying denied " }”

Leave a Comment