Skip to content

Commit

Permalink
Updating documentation to show how to use the plugin dynamically.
Browse files Browse the repository at this point in the history
  • Loading branch information
thephpguy committed Apr 1, 2023
1 parent 7625ed6 commit d81c097
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/medusa-plugin-sendgrid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,26 @@ Handle sending emails to customers related to orders, restock notifications, use

---

## Dynamic usage

You can resolve the SendGrid service to dynamically send emails via sendgrid.

Example:

```
const sendgridService = scope.resolve("sendgridService")
const sendOptions = {
templateId: "d-123....",
from: "ACME <[email protected]>",
to: "[email protected]",
data: { dynamic: "data" }
};
sendgridService.sendEmail(sendOptions)
```

---

## Additional Resources

- [SendGrid Plugin Documentation](https://docs.medusajs.com/plugins/notifications/sendgrid)

0 comments on commit d81c097

Please sign in to comment.