summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-19 12:51:42 -0700
committerDouwe Maan <douwe@gitlab.com>2015-08-19 12:51:42 -0700
commit0bc94198fc64f7a0f9f7ee7d33dcae9aa50d1e3f (patch)
tree1817eb5ab5a56d03d7fa56ea6b382638e7267148 /app/mailers
parent4e33127b3a72d507e093fd5cc520089c88640892 (diff)
downloadgitlab-ce-0bc94198fc64f7a0f9f7ee7d33dcae9aa50d1e3f.tar.gz
Fix BaseMailer.
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/base_mailer.rb20
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