mitodl / mitxonline

BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Flexible Pricing: email notifications should be sent when statuses change #616

Closed jkachel closed 2 years ago

jkachel commented 2 years ago

The Flexible Pricing system doesn't proactively provide the learner feedback about the status of their request. We should add email notifications to the system, similar to the email notifications in MicroMasters, to alert the learner of status changes. (This just means email when the status changes administratively.)

Acceptance Criteria

This functionality was mentioned in https://github.com/mitodl/mitxonline/pull/611 .

asadiqbal08 commented 2 years ago

@jkachel In order to send an email from frontend side (react.js), I am looking around to use the EmailJs npm package that will use for sending email. EmailJS helps to send emails using client-side technologies only. No server is required.

Can you also tell me about the {{subject}} | {{body}} for the email template to use when sending emails ? Please suggest over it.

jkachel commented 2 years ago

The subject and body text should mostly clone what's in MicroMasters: https://github.com/mitodl/micromasters/blob/master/financialaid/constants.py#L55-L84 . (These need to be implemented as regular emails, though, not as constants like they're done here - just grab the content itself from MicroMasters.)

I like the idea of sending via the React app itself but this should be handled by Django so that the same emails can be sent by other parts of the system. There's some existing email code in the ecommerce app if you want to see how we're sending email there and I'm thinking the system should send email when the FlexiblePrice object is saved (if there's a status change).