mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 13:16:06 +08:00
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:
@ -147,7 +147,7 @@ class Admin::EmailController < Admin::AdminController
|
||||
retry_count = 0
|
||||
|
||||
begin
|
||||
Jobs.enqueue(:process_email, mail: params[:email], retry_on_rate_limit: true)
|
||||
Jobs.enqueue(:process_email, mail: params[:email], retry_on_rate_limit: true, source: :handle_mail)
|
||||
rescue JSON::GeneratorError => e
|
||||
if retry_count == 0
|
||||
params[:email] = params[:email].force_encoding('iso-8859-1').encode("UTF-8")
|
||||
|
Reference in New Issue
Block a user