module MultiSMTP::Notifiers::Airbrake

Public Class Methods

extract_mail_params(mail) click to toggle source
# File lib/multi_smtp/notifiers/airbrake.rb, line 11
def self.extract_mail_params(mail)
  {
    delivery_handler: mail.delivery_handler.to_s,
    from: mail.from,
    subject: mail.subject,
    to: mail.to
  }
end
notify(e, mail) click to toggle source
# File lib/multi_smtp/notifiers/airbrake.rb, line 4
def self.notify(e, mail)
  Airbrake.notify(e,
    error_message: "Email delivery failed with all SMTP providers.",
    parameters: { mail: extract_mail_params(mail) }
  )
end