I want to add a name to my "from" field using the SendGrid API, but I do not know how to do this. I tried setting the "from" parameter in sendgrid.send
to Name <[email protected]>
but that didn't work. Thanks.
Updated example with the syntax used in the latest version of the Sendgrid Node.js library.
sendgrid.send({
to: '[email protected]',
from: {
email: '[email protected]',
name: 'Sender Name'
},
subject: 'Hello World',
text: 'My first email through SendGrid'
});