joegattnet/joegattnet_v3

View on GitHub
app/mailers/cloud_note_mailer.rb

Summary

Maintainability
A
35 mins
Test Coverage
class CloudNoteMailer < ActionMailer::Base
  default from: NB.admin_email

  def syncdown_note_failed(provider, guid, title, username, error = 'failed')
    @provider = provider.titlecase
    @guid = guid
    @title = title
    @username = username

    mail(
      to: NB.admin_email,
      subject: I18n.t("notes.sync.#{ error }.email.subject", provider: @provider.titlecase, guid: @guid, title: @title, username: @username),
      host: NB.host
    )
  end
end