Reputation: 129
When I'm using SendGrid to send email in Laravel, it results in the following error:
"550 unauthenticated senders not allowed"
I couldn't find out why this happens. So far, I've configured sender authentication from SendGrid account and created an API key, which is used as a password and username as apikey.
I've also tried with the same set of credentials (username and password) from SendGrid, but this also didn't work.
My .env file sets these mail parameters:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=API Key
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME="text.com"
Upvotes: 0
Views: 14607
Reputation: 2444
"If you’re getting an “Unauthenticated Senders Not Allowed” error, the problem usually lies in authenticating with our SMTP server. This error gets triggered when there was an attempt to hand over an email message through smtp.sendgrid.net before authenticating the connection with your SendGrid username and password."
From the docu at https://sendgrid.com/docs/for-developers/sending-email/smtp-errors-and-troubleshooting/#550-unauthenticated-senders-not-allowed
So check this:
Repeat the steps described at https://sendgrid.com/docs/for-developers/sending-email/authentication/#api-key-recommended and at https://sendgrid.com/docs/for-developers/sending-email/laravel/
Replace 'apikey' and 'API Key' in your .env file by the SendGrid username and SendGrid password that you set.
Upvotes: 0