discourse/spec/components/email
Martin Brennan 87684f7c5e
FEATURE: Use group SMTP job and mailer instead of UserNotifications change (#13489)
This PR backtracks a fair bit on this one https://github.com/discourse/discourse/pull/13220/files.

Instead of sending the group SMTP email for each user via `UserNotifications`, we are changing to send only one email with the existing `Jobs::GroupSmtpEmail` job and `GroupSmtpMailer`. We are changing this job and mailer along with `PostAlerter` to make the first topic allowed user the `to_address` for the email and any other `topic_allowed_users` to be the CC address on the email. This is to cut down on emails sent via SMTP, which is subject to daily limits from providers such as Gmail. We log these details in the `EmailLog` table now.

In addition to this, we have changed `PostAlerter` to no longer rely on incoming email email addresses for sending the `GroupSmtpEmail` job. This was unreliable as a user's email could have changed in the meantime. Also it was a little overcomplicated to use the incoming email records -- it is far simpler to reason about to just use topic allowed users.

This also adds a fix to include cc_addresses in the EmailLog.addressed_to_user scope.
2021-06-28 08:55:13 +10:00
..
authentication_results_spec.rb enqueue spam/dmarc failing emails instead of hiding (#8674) 2020-01-21 11:12:00 -05:00
cleaner_spec.rb FEATURE: Remove attachments and truncate raw field for incoming emails (#8253) 2019-10-30 16:54:35 +11:00
email_spec.rb FIX: Replace use of regular expression (#12838) 2021-04-27 08:48:51 +03:00
message_builder_spec.rb FEATURE: Use group SMTP job and mailer instead of UserNotifications change (#13489) 2021-06-28 08:55:13 +10:00
processor_spec.rb Update rubocop to 2.3.1. 2020-07-24 17:19:21 +08:00
receiver_spec.rb FIX: Prevent resurrecting old topics via email reply for group inboxes with SMTP enabled (#13382) 2021-06-21 11:45:00 +10:00
renderer_spec.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
sender_spec.rb FEATURE: Use group SMTP job and mailer instead of UserNotifications change (#13489) 2021-06-28 08:55:13 +10:00
styles_spec.rb UX: Improve style of GitHub PR body in emails (#13198) 2021-05-31 14:03:19 +03:00