Created
December 24, 2010 13:25
-
-
Save davidakachaos/754231 to your computer and use it in GitHub Desktop.
WsMailer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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