Created
February 1, 2012 09:03
-
-
Save fbettag/1716051 to your computer and use it in GitHub Desktop.
Lift Error Repo
This file contains hidden or 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
object MailHelpers { | |
import net.liftweb.util.Mailer | |
import net.liftweb.util.Mailer._ | |
def report(subject: String, msg: String) { | |
Mailer.sendMail( | |
From("report@yoursite", Full("From Name")), | |
Subject(subject), | |
To("service-ml@your-domain"), | |
PlainPlusBodyType(msg, "UTF-8")) | |
} | |
} |
This file contains hidden or 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
try { | |
somethingexplodes() | |
} catch { | |
case e => MailHelpers.report("Error in Foo", e.getMessage()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment