diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-15 12:37:51 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-15 12:37:51 +0000 |
commit | d2a895dad80b5f7e12bb930fc92750d6848f7b21 (patch) | |
tree | 29e5a2baa51439254f16fa6c2c38c8b9235ca7b8 /app/mailers/emails | |
parent | 089f5b914eed846c32a00f0fa71f7cfdca1dd654 (diff) | |
parent | c26b001ebcf43c3bdc18d1afcfbafa87b0b18366 (diff) | |
download | gitlab-ce-d2a895dad80b5f7e12bb930fc92750d6848f7b21.tar.gz |
Merge branch 'emailsonpush-replyto' into 'master'
Set EmailsOnPush reply-to address to committer email when enabled.
Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2227.
See merge request !520
Diffstat (limited to 'app/mailers/emails')
-rw-r--r-- | app/mailers/emails/projects.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index 2584e9d48b1..0dbb2939bb3 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -125,9 +125,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 |