cardiacsociety / web-services

MappCPD API and other services
0 stars 1 forks source link

Handle notifications #64

Closed mikedonnici closed 5 years ago

mikedonnici commented 5 years ago

Need an internal package and admin endpoint to handle notifications (emails). This will allow agnostic email sending from the admin and member applications, in the event we need / want to switch services.

mikedonnici commented 5 years ago

Created a quick public package to facilitate the actual sending of the emails via Sendgrid, Mailgun or Amazon SES: https://github.com/8o8/email

mikedonnici commented 5 years ago

To use Amazon SES will require 3 new .env vars:

AWS_SES_ACCESS_KEY_ID=""
AWS_SES_SECRET_ACCESS_KEY=""
AWS_SES_REGION="us-east-1"
mikedonnici commented 5 years ago

Have done an admin endpoint to handle notifications, however, also need a member endpoint that handles sending a notification to the member identified in the JWT.

This will be useful for generating emails from the member app (such as password reset) without having to authorize an admin token.

mikedonnici commented 5 years ago

Needs to handle attachments.

mikedonnici commented 5 years ago

Now handles attachments!