-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: add "null" SMTP transport mode #48977
feat: add "null" SMTP transport mode #48977
Conversation
This is an cherry-picked, early commit of the still pending PR nextcloud#48977. == Goal Allow disabling mail delivery altogether. == Usecase If mails ought to be send by other means than rendering messages from templates and sending them via SMTP-like protocols. Example: listening to specific Nextcloud events and pass parameters to a centralized (i.e. REST-based) API that sends e-mails. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
I chose the string |
91ac85f
to
dab36ce
Compare
dab36ce
to
766465e
Compare
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.
Current version looks good, it adds support for NullTransport.
How will the SMTP settings UI behave when using null transport though?
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
4d7d2de
to
8449979
Compare
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.
Looks good :)
8449979
to
47e4033
Compare
@thlehmann-ionos, php linter is not happy, can you fix it? You probably just need to run |
47e4033
to
42f26ae
Compare
42f26ae
to
7ce032f
Compare
@thlehmann-ionos can you rebase? Then it should be good to merge :) |
Currently $this->instance is never set, so the code is no-op. This brings back caching of the instance. Caching broke with be7db15 Swift to \Swift_Mailer as abstraction Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
The IDE hinted the value is immediately overwritten. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
== Goal Allow disabling mail delivery altogether. == Usecase If mails ought to be send by other means than rendering messages from templates and sending them via SMTP-like protocols. Example: listening to specific Nextcloud events and pass parameters to a centralized (i.e. REST-based) API that sends e-mails. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
When the mail transport is configured as null transport, the configuration UI would not work. == Background The null transport is meant for situations where operators implement mail delivery via custom mechanisms like REST APIs. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
7ce032f
to
3f6c969
Compare
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
Summary
If mails ought to be send by other means than rendering messages from
templates and sending them via SMTP-like protocols.
Use-case example
Listening to specific Nextcloud events and pass parameters to a centralized (i.e. REST-based) API that sends e-mails.
Background why not ...
mail_template_class
: same as beforeBeforeMessageSent
and act upon that: would be an option, but it would still render messages that will never be sent and the template data might also have to be enriched with custom information (i.e. in our case the sender's user ID, not their e-mail address)(Short list of internal reasoning we had before making this pull request.)
Checklist
Screenshots before/after for front-end changesBackports requested where applicable (ex: critical bugfixes)