-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: decouple SMTP email sending logic from core to allow plugins to override #4740
feat: decouple SMTP email sending logic from core to allow plugins to override #4740
Conversation
…rce/reaction into feat-4730-dancastellon-email-appevents
…rce/reaction into feat-4730-dancastellon-email-appevents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to complete all the testing steps and everything worked as described. @aldeed I'm going to hold off merging until you've had a chance to do a code review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small change to make, but looks good
Resolves #4730
Impact: minor
Type: feature
Issue
Currently, SMTP email sending logic is hard-coded in core. This makes it impossible to integrate with a third-party email provider that does not support SMTP, without modifying core code.
Solution
This PR decouples SMTP from core by creating a new
reaction-email-smtp
included plugin. Core now emits asendEmail
event for each email job, which any plugin can respond to. The included SMTP plugin responds to it, checks if an SMTP email provider is configured, and sends the email if so.The email provider config form found at Dashboard -> Emails -> Mail Provider is now also able to be overridden. Plugins can use register.js to provide a React component to use here.
Breaking changes
None
Testing
email-provider-test
plugin inimports/plugins/custom
with 3 files: