Sha256: 8c19964c67559682c97931cc03a75111e96ff6cad8b8ededbef198c0ee4cc94e

Contents?: true

Size: 473 Bytes

Versions: 11

Compression:

Stored size: 473 Bytes

Contents

class Voltron::NotificationMailer < ApplicationMailer
  default from: Voltron.config.notify.email_from

  def notify(mail_args, var_args = {}, attachment_args = {})
    # Make all passed in variables instance variables so they can be used in the template
    var_args.each { |name, value| instance_variable_set "@#{name}", value }

    # Add all of the attachments
    attachment_args.each { |name, file| attachments[name] = File.read(file) }

    mail mail_args
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
voltron-notify-0.1.6 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.1.8 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.1.4 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.2.0 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.1.9 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.1.3 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.1.5 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.1.2 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.1.7 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.2.2 app/mailers/voltron/notification_mailer.rb
voltron-notify-0.2.1 app/mailers/voltron/notification_mailer.rb