SendGrid plugin (#77)

Closes #73 and #77
This commit is contained in:
Oliver Windall Juhl authored and GitHub committed 2020-07-03 18:00:54 +02:00
1 parent 081c5278cb
commit d6fc477636
22 files changed
+6037 -23

No files matched your search

@@ -0,0 +1,23 @@
class UserSubscriber {
constructor({ sendgridService, eventBusService }) {
this.sendgridService_ = sendgridService
this.eventBus_ = eventBusService
this.eventBus_.subscribe("user.password_reset", async (data) => {
await this.sendgridService_.transactionalEmail(
"user.password_reset",
data
)
})
this.eventBus_.subscribe("customer.password_reset", async (data) => {
await this.sendgridService_.transactionalEmail(
"customer.password_reset",
data
)
})
}
}
export default UserSubscriber