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

Version Path
roroacms-1.0.0 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6.7 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6.6 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6.5 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6.4 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6.3 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6.2 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6.1 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.6 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.5 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.4 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.3 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.2 app/mailers/roroacms/emailer.rb
roroacms-0.0.8.1 app/mailers/roroacms/emailer.rb
roroacms-0.0.8 app/mailers/roroacms/emailer.rb
roroacms-0.0.7.10 app/mailers/roroacms/emailer.rb
roroacms-0.0.7.8 app/mailers/roroacms/emailer.rb
roroacms-0.0.7.7 app/mailers/roroacms/emailer.rb
roroacms-0.0.7.6 app/mailers/roroacms/emailer.rb
roroacms-0.0.7.5 app/mailers/roroacms/emailer.rb