diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-08-19 12:51:42 -0700 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-08-19 12:51:42 -0700 |
commit | 0bc94198fc64f7a0f9f7ee7d33dcae9aa50d1e3f (patch) | |
tree | 1817eb5ab5a56d03d7fa56ea6b382638e7267148 /app/mailers | |
parent | 4e33127b3a72d507e093fd5cc520089c88640892 (diff) | |
download | gitlab-ce-0bc94198fc64f7a0f9f7ee7d33dcae9aa50d1e3f.tar.gz |
Fix BaseMailer.
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/base_mailer.rb | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/app/mailers/base_mailer.rb b/app/mailers/base_mailer.rb index 38b8a296842..8299a4140dc 100644 --- a/app/mailers/base_mailer.rb +++ b/app/mailers/base_mailer.rb @@ -1,4 +1,4 @@ -class EmailRejectionMailer < ActionMailer::Base +class BaseMailer < ActionMailer::Base add_template_helper ApplicationHelper add_template_helper GitlabMarkdownHelper @@ -12,24 +12,6 @@ class EmailRejectionMailer < ActionMailer::Base delay_for(2.seconds) end - def rejection(reason, original_raw, can_retry = false) - @reason = reason - @original_message = Mail::Message.new(original_raw) - - headers = { - to: @original_message.from, - subject: "[Rejected] #{@original_message.subject}" - } - - headers['Message-ID'] = SecureRandom.hex - headers['In-Reply-To'] = @original_message.message_id - headers['References'] = @original_message.message_id - - headers['Reply-To'] = @original_message.to.first if can_retry - - mail(headers) - end - def can? Ability.abilities.allowed?(user, action, subject) end |