souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
389 stars 62 forks source link

Simplify email sending #105

Closed RealOrangeOne closed 2 years ago

RealOrangeOne commented 2 years ago

This will hopefully fix a number of issues around email sending issues. The current implementation is very low level, and with email that's almost certainly a bad idea.

I first tried this with smtp.SendMail, which made things a lot cleaner, but using a library should help even more.

Should fix:

I could do with a lot of help testing this in different environments and with different providers.

I'm not entirely happy with how validation and sending are 2 separate steps - perhaps that wants integrating / a rethink?

(Disclaimer: I'm not a frequent Go writer)

souramoo commented 2 years ago

Thank you very much for this! I added the lower level implementation to help give more control over the sending process (in response to a pull request) - before that we used SendMail.

The current implementation is problematic however so I do appreciate the pull request to get it back to working order, and thank you very much for integrating the simple-mail library!

I am happy to merge pending the CI unit tests, it is almost certainly better than what we have now even if not fully tested - hopefully we can pick up any issues before the next stable release!