mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FEATURE: Allow checking the raw response of a bounced email
This commit is contained in:
@ -88,6 +88,18 @@ class Admin::EmailController < Admin::AdminController
|
||||
render_json_dump(serializer)
|
||||
end
|
||||
|
||||
def incoming_from_bounced
|
||||
params.require(:id)
|
||||
|
||||
bounced = EmailLog.find(params[:id].to_i)
|
||||
email_local_part, email_domain = SiteSetting.notification_email.split('@')
|
||||
bounced_to_address = "#{email_local_part}+verp-#{bounced.bounce_key}@#{email_domain}"
|
||||
|
||||
incoming_email = IncomingEmail.find_by(to_addresses: bounced_to_address)
|
||||
serializer = IncomingEmailDetailsSerializer.new(incoming_email, root: false)
|
||||
render_json_dump(serializer)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def filter_email_logs(email_logs, params)
|
||||
|
Reference in New Issue
Block a user