discourse/lib/email
Martin Brennan 64ba5b1d21
FIX: Group SMTP email improvements (#11633)
Fixes a rare race condition causing the `Imap::Sync` class to create an incoming email and associated post/topic, which then kicks off the PostAlerter to notify others in the PM about a reply in the topic, but for the OP which is not necessary (because the person emailing the IMAP inbox already knows about the OP). Basically, we should never be sending the group SMTP email for the first post in a topic.

Also in this PR:

* Custom attribute accessors for the to/from/cc addresses on `IncomingEmail`, to parse them from an array to a joined string so the logic for this is only in one place.
* Store extra detail against the `IncomingEmail` created in `GroupSmtpMailer`
* regex test Mail header Reply-To as string instead of Field, which fixes `warning: deprecated Object#=~ is called on Mail::Field; it always returns nil`
* Add DEBUG_IMAP to log all IMAP logs as warnings for easier debugging
* Changed the Rails logging to `ImapSyncLog` in the `GroupSmtpMailer`
2021-01-05 15:32:04 +10:00
..
authentication_results.rb enqueue spam/dmarc failing emails instead of hiding (#8674) 2020-01-21 11:12:00 -05:00
build_email_helper.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
cleaner.rb FEATURE: Remove attachments and truncate raw field for incoming emails (#8253) 2019-10-30 16:54:35 +11:00
message_builder.rb FIX: Make all email subject vars available in notification subjects (#11064) 2020-11-02 20:00:11 -08:00
processor.rb FEATURE: Implement support for IMAP and SMTP email protocols. (#8301) 2020-07-10 12:05:55 +03:00
receiver.rb FIX: Group SMTP email improvements (#11633) 2021-01-05 15:32:04 +10:00
renderer.rb FIX: during concurrent emails generation renderer should not be reused 2019-10-10 08:50:48 +11:00
sender.rb FIX: Group SMTP email improvements (#11633) 2021-01-05 15:32:04 +10:00
styles.rb FIX: Inline avatar style for onebox when embedding secure images (#11229) 2020-11-16 09:58:40 +10:00