Sha256: 471f97d5fb654346595419a591b7e5c6d5876237c48bbb6b87a1e58529c1354b

Contents?: true

Size: 765 Bytes

Versions: 2

Compression:

Stored size: 765 Bytes

Contents

class NotificationMailer < ActionMailer::Base
  default :from => Mailboxer.default_from
  #Sends and email for indicating a new notification to a receiver.
  #It calls new_notification_email.
  def send_email(notification,receiver)
    new_notification_email(notification,receiver)
  end

  include ActionView::Helpers::SanitizeHelper

  #Sends an email for indicating a new message for the receiver
  def new_notification_email(notification,receiver)
    @notification = notification
    @receiver = receiver
    subject = notification.subject.to_s
    subject = strip_tags(subject) unless subject.html_safe?
    mail(:to => receiver.send(Mailboxer.email_method,notification), :subject => t('mailboxer.notification_mailer.subject', :subject => subject))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mailboxer-0.10.1 app/mailers/notification_mailer.rb
mailboxer-0.10.0 app/mailers/notification_mailer.rb