mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 00:02:05 -05:00
c8d322d1be
This change has a tradeoff. It increases our backscatter vulnerability - the subject could have spammy content - but it's extremely valuable to the user to know exactly which message was rejected. If you sent two at the same time, and only one was rejected, you would have no way of knowing which worked and which to resend without going to the website (which is what email-in is trying to avoid, kinda).
14 lines
440 B
Ruby
14 lines
440 B
Ruby
require_dependency 'email/message_builder'
|
|
|
|
class RejectionMailer < ActionMailer::Base
|
|
include Email::BuildEmailHelper
|
|
|
|
def send_rejection(message_from, message_body, message_subject, forum_address, template)
|
|
build_email(message_from,
|
|
template: "system_messages.#{template}",
|
|
source: message_body,
|
|
former_title: message_subject,
|
|
destination: forum_address)
|
|
end
|
|
|
|
end
|