Commit 0bc94198 authored by Douwe Maan's avatar Douwe Maan

Fix BaseMailer.

parent 4e33127b
class EmailRejectionMailer < ActionMailer::Base class BaseMailer < ActionMailer::Base
add_template_helper ApplicationHelper add_template_helper ApplicationHelper
add_template_helper GitlabMarkdownHelper add_template_helper GitlabMarkdownHelper
...@@ -12,24 +12,6 @@ class EmailRejectionMailer < ActionMailer::Base ...@@ -12,24 +12,6 @@ class EmailRejectionMailer < ActionMailer::Base
delay_for(2.seconds) delay_for(2.seconds)
end 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? def can?
Ability.abilities.allowed?(user, action, subject) Ability.abilities.allowed?(user, action, subject)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment