discourse/spec/fixtures
Martin Brennan eb2c399445
FEATURE: Use group SMTP settings for sending user notification emails (initial) (#13220)
This PR changes the `UserNotification` class to send outbound `user_private_message` using the group's SMTP settings, but only if:

* The first allowed_group on the topic has SMTP configured and enabled
* SiteSetting.enable_smtp is true
* The group does not have IMAP enabled, if this is enabled the `GroupSMTPMailer` handles things

The email is sent using the group's `email_username` as both the `from` and `reply-to` address, so when the user replies from their email it will go through the group's SMTP inbox, which needs to have email forwarding set up to send the message on to a location (such as a hosted site email address like meta@discoursemail.com) where it can be POSTed into discourse's handle_mail route.

Also includes a fix to `EmailReceiver#group_incoming_emails_regex` to include the `group.email_username` so the group does not get a staged user created and invited to the topic (which was a problem for IMAP), as well as updating `Group.find_by_email` to find using the `email_username` as well for inbound emails with that as the TO address.

#### Note

This is safe to merge without impacting anyone seriously. If people had SMTP enabled for a group they would have IMAP enabled too currently, and that is a very small amount of users because IMAP is an alpha product, and also because the UserNotification change has a guard to make sure it is not used if IMAP is enabled for the group. The existing IMAP tests work, and I tested this functionality by manually POSTing replies to the SMTP address into my local discourse.

There will probably be more work needed on this, but it needs to be tested further in a real hosted environment to continue.
2021-06-03 14:47:32 +10:00
..
backups FIX: Backups should use relative paths for local uploads 2020-08-21 15:22:28 +02:00
csv FEATURE: Allow admins to pre-populate user fields (#12361) 2021-03-29 14:03:19 +03:00
db FIX: Restoring backup from PG12 could fail on PG10 2020-06-16 16:04:14 +02:00
emails FEATURE: Use group SMTP settings for sending user notification emails (initial) (#13220) 2021-06-03 14:47:32 +10:00
encodings FIX: Try detecting encoding of RSS feed 2018-08-01 10:41:20 +02:00
feed FIX: Try respecting charset in HTTP header of RSS feed 2018-08-01 10:41:20 +02:00
i18n FIX: Use correct locale when translating without cache 2019-06-05 14:19:56 +02:00
images FIX: Be able to handle long file extensions (#12375) 2021-03-17 12:01:29 -06:00
json FIX: improve Vanilla importing (#10478) 2020-08-24 16:19:57 -04:00
md DEV: Update markdown-it from 8.4.1 to 10.0.0 (#8164) 2019-10-08 13:00:22 +02:00
media FIX: Add attachment content-disposition for all non-image files (#10058) 2020-06-17 11:16:37 +10:00
mmdb UX: Use user locale for locations. (#6527) 2018-10-25 10:54:01 +00:00
multisite Introduce multisite tests for better coverage. 2017-08-08 12:58:22 +09:00
onebox FIX: return an empty result if response from Amazon is missing expected attributes (#13173) 2021-06-01 16:23:18 -04:00
pdf FEATURE: Add attachments to outgoing emails 2019-07-25 15:57:45 +02:00
plugins DEV: Deprecate `message` parameter in auth provider plugin API (#12523) 2021-03-25 13:23:48 +00:00
scss DEV: Run prettier. (#6420) 2018-09-21 11:02:23 +00:00
site_settings FIX: fails loud if default setting is not set 2017-08-15 12:07:25 +02:00
theme_settings DEV: support json_schema in theme settings (#12294) 2021-03-10 20:15:04 -05:00
themes FIX: Allow themes to upload and serve js files (#8188) 2019-10-14 15:40:33 +11:00
woff2 FEATURE: support uploads for themes 2017-05-10 15:47:11 -04:00