mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: support for mandrill webhooks
This commit is contained in:
@@ -133,9 +133,12 @@ module Email
|
||||
@message.header['X-Discourse-Post-Id'] = nil if post_id.present?
|
||||
@message.header['X-Discourse-Reply-Key'] = nil if reply_key.present?
|
||||
|
||||
# it's the only way to pass the original message_id when using mailjet
|
||||
if ActionMailer::Base.smtp_settings[:address][".mailjet.com"]
|
||||
# pass the original message_id when using mailjet/mandrill
|
||||
case ActionMailer::Base.smtp_settings[:address]
|
||||
when /\.mailjet\.com/
|
||||
@message.header['X-MJ-CustomID'] = @message.message_id
|
||||
when "smtp.mandrillapp.com"
|
||||
@message.header['X-MC-Metadata'] = { message_id: @message.message_id }.to_json
|
||||
end
|
||||
|
||||
# Suppress images from short emails
|
||||
|
||||
Reference in New Issue
Block a user