summaryrefslogtreecommitdiff
path: root/app/mailers/emails
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-14 12:52:33 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-14 12:52:33 +0200
commitc26b001ebcf43c3bdc18d1afcfbafa87b0b18366 (patch)
tree2c6ab8c1077a53863645dd2bdeb1a9352eb60486 /app/mailers/emails
parentae6d0aaae0d8f6251b30a8e5243a98f083f0cac9 (diff)
downloadgitlab-ce-c26b001ebcf43c3bdc18d1afcfbafa87b0b18366.tar.gz
Set EmailsOnPush reply-to address to committer email when enabled.emailsonpush-replyto
Diffstat (limited to 'app/mailers/emails')
-rw-r--r--app/mailers/emails/projects.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index 20a863c3742..d15123e7311 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -84,9 +84,17 @@ module Emails
@disable_footer = true
- mail(from: sender(author_id, send_from_committer_email),
- to: recipient,
- subject: @subject)
+ reply_to =
+ if send_from_committer_email && can_send_from_user_email?(@author)
+ @author.email
+ else
+ Gitlab.config.gitlab.email_reply_to
+ end
+
+ mail(from: sender(author_id, send_from_committer_email),
+ reply_to: reply_to,
+ to: recipient,
+ subject: @subject)
end
end
end