diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/notify.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index fef8149b325..aa6b9da82dd 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -109,6 +109,12 @@ class Notify < BaseMailer headers["X-GitLab-#{model.class.name}-ID"] = model.id headers['X-GitLab-Reply-Key'] = reply_key + if !@labels_url && @sent_notification && @sent_notification.unsubscribable? + headers['List-Unsubscribe'] = unsubscribe_sent_notification_url(@sent_notification, force: true) + + @sent_notification_url = unsubscribe_sent_notification_url(@sent_notification) + end + if Gitlab::IncomingEmail.enabled? address = Mail::Address.new(Gitlab::IncomingEmail.reply_address(reply_key)) address.display_name = @project.name_with_namespace |