Merge branch 'generate-valid-message-id-for-email-rejections' into 'master'

Generate valid (RFC 2111) Message-ID in email rejection mailer

Use a Message-ID that is RFC 2111 compliant. This fix is consistent with
how the Message-ID is generated in the 'notify' mailer.

See merge request !2656
This commit is contained in:
Douwe Maan 2016-02-02 12:25:18 +00:00
commit 680d66db9e

View file

@ -10,7 +10,7 @@ class EmailRejectionMailer < BaseMailer
subject: "[Rejected] #{@original_message.subject}"
}
headers['Message-ID'] = SecureRandom.hex
headers['Message-ID'] = "<#{SecureRandom.hex}@#{Gitlab.config.gitlab.host}>"
headers['In-Reply-To'] = @original_message.message_id
headers['References'] = @original_message.message_id