DEV: Add created_via column to IncomingEmail (#11751)

This should make it easier to track down how the incoming email was created, which is one of four locations:

The POP3 poller (which picks up reply via email replies)
The admin email controller #handle_mail (which is where hosted mail is sent)
The IMAP sync tool
The group SMTP mailer, which sends emails when replying to IMAP topics, pre-emptively creating IncomingEmail records to avoid double syncing
This commit is contained in:
Martin Brennan
2021-01-20 13:22:41 +10:00
committed by GitHub
parent 2e39939fe9
commit fb184fed06
13 changed files with 44 additions and 10 deletions

View File

@ -254,7 +254,8 @@ module Imap
destinations: [@group],
imap_uid_validity: @status[:uid_validity],
imap_uid: email['UID'],
imap_group_id: @group.id
imap_group_id: @group.id,
source: :imap
)
receiver.process!