massenergize / api

Backend Code for Massenergize Portal. This provides the API to the backend database, and is shared by the various front-end portal projects.
MIT License
5 stars 9 forks source link

Sending or scheduling email message to users or groups - back end support #807

Open BradHN1 opened 1 year ago

BradHN1 commented 1 year ago

We want to send the Community Contact email message out as a nudge to the primary community contacts. It may need to go out multiple times and we want to track who opens and responds to it. it should be sent from support@massenergize.org.

Add this email message to PostMark Create Task to send it, with a feature flag to select communities.

BradHN1 commented 1 year ago

New specification: make this fuctionality more general: SAdmins or CAdmins both should be able to send out a message to specific groups of users.

Front end implementation: Implement a new feature for SAdmins (later CAdmins enabled with feature flag for community) Under Messages menu, a new option: Send message

Dialog will have a To selection: For Sadmins: Radio buttons: Super Admins, Community Admins, Community Contacts, Users Depending on the radio button chosen, the drop-down below it will list in alphabetical order all the users in that category, with an option to choose all (default) or choose none, and then choose specific users to send to.

From selection: for SAdmins the default from and reply-to address will be their email and name. Can select MassEnergize Support, a Community Contact (if they have a sender signature, add this later), or no-reply.

Message Subject Message text - HTML field which has ability to add images

Send, Schedule (send at a chosen time), Save (for future sending (can add this later)), or Cancel When message sent, saved to DB as message sent,

Back-end implementation: new route messages.send with inputs as described above, including the list of user ID's to send to, message content and the scheduled time.
The route would schedule a one-off task which could happen right away or when it is scheduled.

No need for PostMark templates at this point.

BradHN1 commented 9 months ago

This needs further testing. Known bugs - multiple emails sent to each recipient - needs to be fixed. Improve email format.

BradHN1 commented 7 months ago

@abdullai-t - have you been able to fix this yet?

abdullai-t commented 7 months ago

I’m still working on it. I will push a fix by the end of the day.

BradHN1 commented 5 months ago

@abdullai-t This is still broken. I don't see messages getting to Postmark