sendgrid-nodejs: The from address does not match
Issue Summary
I’m trying to integrate nodejs app with SendGrid, by submitting contact form in the front-end
so from mail could be any one
and to will be me
And I got this message
Code Snippet
sendGrid.setApiKey(process.env.MY_SENDGRID_API_KEY);
const msg = {
to: 'myemai@gmail.com,
from: "sendemail@anyone.com",
subject: 'Sending with SendGrid is Fun',
text: message,
html: `<strong>${name} is trying to get in touch with you!</strong>`,
};
return sendGrid.send(msg);
Exception/Log
"message": "The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements",
Technical details:
- sendgrid-nodejs version: latest
- node version: 10.16.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (3 by maintainers)
This use case is not supported. The sender needs to be a verified sender identity: https://sendgrid.com/docs/for-developers/sending-email/sender-identity/
You need to verify the mail that is the sender. I solved this problem in this way:
Go here: Setting -> Sender Authentication -> Single Sender Verification -> Verify an Address
Example
After that, fill out the form on the right and complete the verification of the sender’s mail.
You can read with more detail here.
@childish-sambino booooo
For anyone wondering, If you’re using the default email templates you need to set your shipper email to your sendgrid verified email as it overrides the default.
http://localhost:1337/admin/settings/users-permissions/email-templates
use phpmailer or laravel mail
I have the same problem. I have verified my sender address and still get this message
@a5okol @thinkingserious I still get this error even though I have successfully completed the single sender verification!
I have the same problem. I have verified the domain and I still get this 403.