This is a feature request, but also something that could be suitable for a plugin - where we would like some guidance/input.
Basically, we feel that there isn’t enough control over email notifications that are sent out to users, both in deciding which to send, but also the actual templating. We are aware that email templates are customisable, but we feel it’s a bit limiting. We can’t for example style anything that goes on in {message}. That isn’t to say Discourse doesn’t have a pretty solid emailing system, but it has it’s limits.
Therefore, it would be really nice if we could have the option of handling anything email related over to a external service, such as Postmark.
This module would for example list all available email types (user_posted, user_private_message, user_invited_to_topic, etc.), and you would have the option to enable or disable for the Discourse email handler. If disabled, you would then be given the option to post it to an external api like Postmark, defining which template to use, and mapping available fields (like user, post, etc.) to the template model.
We’re aware that this is pretty library specific (the Postmark API obviously varies from others), but perhaps a solution could be found for a general use case. Again, we’re interested to hear any thoughts.