Sendgrid-nodejs: The from address does not match

Created on 8 Apr 2020  ·  4Comments  ·  Source: sendgrid/sendgrid-nodejs

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: '[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);

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
question

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.

All 4 comments

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

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.

@a5okol @thinkingserious
I still get this error even though I have successfully completed the single sender verification!
sendgrid

Was this page helpful?
0 / 5 - 0 ratings