Skip to content

Commit

Permalink
docs: Update README.md to explicitly state that 'send()' returns a pr…
Browse files Browse the repository at this point in the history
…omise (#989)
  • Loading branch information
Ifunanyacollins authored Feb 13, 2020
1 parent 1b3a81f commit de73e14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/mail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ const msg = {
text: 'and easy to do anywhere, even with Node.js',
html: '<strong>and easy to do anywhere, even with Node.js</strong>',
};
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.
Expand Down Expand Up @@ -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)
![Twilio SendGrid Logo](https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png)

0 comments on commit de73e14

Please sign in to comment.