9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/mailer_process.rb', line 9
def process_with_mailer(request, response)
if Radiant::Config['mailer.post_to_page?'] && request.post? && request.parameters[:mailer]
config, part_page = mailer_config_and_page
mail = Mail.new(part_page, config, request.parameters[:mailer])
self.last_mail = part_page.last_mail = mail
process_mail(mail, config)
if mail.send
response.redirect(config[:redirect_to], "302 Found") and return if config[:redirect_to]
self.last_mail.data.delete_if { true }
self.last_mail.errors.delete_if { true }
end
end
process_without_mailer(request, response)
end
|