Sha256: eb0aa382adb89fd2d26e0f68da2af8d42f6b01a5829b88f0912fa0061027c5c7
Contents?: true
Size: 882 Bytes
Versions: 25
Compression:
Stored size: 882 Bytes
Contents
module Roroacms class Emailer < ActionMailer::Base default from: "from@example.com" add_template_helper(Roroacms::AdminRoroaHelper) add_template_helper(Roroacms::ViewHelper) default from: Setting.get('smtp_domain') class MailSettingsInterceptor def self.delivering_email(message) message.delivery_method.settings.merge!(Setting.mail_settings) end end register_interceptor MailSettingsInterceptor # sends an email to the admin email address (set in the admin panel) # notifying them that a new administrator has been set up def profile(admin = nil) @admin = admin mail to: Setting.get('site_email') end # sends an email to the admin email address (set in the admin panel) # when someone comments on a blog post def comment(com) @comment = com mail to: Setting.get('site_email') end end end
Version data entries
25 entries across 25 versions & 1 rubygems