External email handler for user notifications

Just my £0.02:

My thoughts are this wouldn’t be terribly hard from a plugin - one could monkey patch all the appropriate methods, and then based on whether the setting is currently to have the Discourse email handler enabled or not, call super within the patched methods, or call your own code.

I think the best way would be to write the plugin with the assumption that other APIs will be supported (so, for instance, include a setting to choose which api to use, and therefore write all the code to work based on what that setting is set at), but not necessarily implementing any of them. Then, it should be trivial for another contributor to implement support for whatever email API they want to use, and send a PR.

2 Me gusta