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
sendGrid.setApiKey(process.env.MY_SENDGRID_API_KEY);
const msg = {
to: '[email protected],
from: "[email protected]",
subject: 'Sending with SendGrid is Fun',
text: message,
html: `<strong>${name} is trying to get in touch with you!</strong>`,
};
return sendGrid.send(msg);
"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",
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/
@childish-sambino booooo
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
After that, fill out the form on the right and complete the verification of the sender's mail.
@a5okol @thinkingserious
I still get this error even though I have successfully completed the single sender verification!
Most helpful comment
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.