summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorDavid Padilla <david@easybroker.com>2016-02-29 23:29:20 -0600
committerRémy Coutable <remy@rymai.me>2016-03-25 13:05:15 +0100
commit31e76baf610e1307090a6bac3a7b3d525bce057a (patch)
tree6381eb0aa46cdfb646f93aaa1bfd7b8e5d881333 /app/mailers
parent63c8a05bf7f18ac4093ece1f08b4b5fd8dba5fac (diff)
downloadgitlab-ce-31e76baf610e1307090a6bac3a7b3d525bce057a.tar.gz
Fix #2364. Fall back to In-Reply-To header when reply key not available
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 8cbc9eefc7b..e7331d88517 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -121,11 +121,17 @@ class Notify < BaseMailer
#
# See: mail_answer_thread
def mail_new_thread(model, headers = {})
- headers['Message-ID'] = message_id(model)
+ headers['Message-ID'] = message_reply_id
+ headers['In-Reply-To'] = message_id(model)
+ headers['References'] = message_id(model)
mail_thread(model, headers)
end
+ def message_reply_id
+ Gitlab.config.incoming_email["address"].gsub("%{key}", reply_key)
+ end
+
# Send an email that responds to an existing conversation thread,
# with headers suitable for grouping by thread in email clients.
#