Skip to content

Instantly share code, notes, and snippets.

@davidakachaos
Created December 24, 2010 13:25
Show Gist options
  • Save davidakachaos/754231 to your computer and use it in GitHub Desktop.
Save davidakachaos/754231 to your computer and use it in GitHub Desktop.
WsMailer
class WsMailer < ActionMailer::Base
def webservice_warning(webservice)
setup_email
@subject += "Webservice warning"
@body[:webservice] = webservice
end
def not_saved_report(saplogs)
setup_email2
@subject += "Automatisch bericht - Referentienummers niet opgeslagen in SAP"
@body[:saplogs] = saplogs
end
def not_cancelled_report(saplogs)
setup_email2
@subject += "Automatisch bericht - Materiaal nummer geen cijfer"
@body[:saplogs] = saplogs
end
def edition_new_created
setup_email2
@subject += "Automatisch bericht - Nieuwe editie aangemaakt"
@body[:webservice] = "Graag de sluitings datum controleren!"
end
protected
def setup_email
@recipients = ADMIN_EMAIL
@from = EMAIL_FROM
@subject = "[ACCEPTATIE OMGEVING Portal] "
@sent_on = Time.now
end
def setup_email2
@recipients = ADMIN_EMAIL2
@from = EMAIL_FROM
@subject = "[ACCEPTATIE OMGEVING Portal] "
@sent_on = Time.now
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment