diff --git a/packages/mail/README.md b/packages/mail/README.md index 0300ba091..a5b17d36d 100644 --- a/packages/mail/README.md +++ b/packages/mail/README.md @@ -63,7 +63,9 @@ const msg = { text: 'and easy to do anywhere, even with Node.js', html: 'and easy to do anywhere, even with Node.js', }; -sgMail.send(msg); +sgMail.send(msg) +.then((res) => //resolved ) +.catch((error) => //rejected ) ``` After executing the above code, you should have an email in the inbox of the recipient. You can check the status of your email [in the UI](https://app.sendgrid.com/email_activity?). Alternatively, we can post events to a URL of your choice using our [Event Webhook](https://sendgrid.com/docs/API_Reference/Webhooks/event.html). This gives you data about the events that occur as Twilio SendGrid processes your email. @@ -104,4 +106,4 @@ Please see our [troubleshooting guide](https://github.com/sendgrid/sendgrid-node @sendgrid/mail is maintained and funded by Twilio SendGrid, Inc. The names and logos for @sendgrid/mail are trademarks of Twilio SendGrid, Inc. -![Twilio SendGrid Logo](https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png) \ No newline at end of file +![Twilio SendGrid Logo](https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png)