Created
May 17, 2019 10:16
-
-
Save verajosemanuel/7595121de15d3d9f3f66ebb7f3c33f01 to your computer and use it in GitHub Desktop.
#mail #error in #R
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
options(error = function() { | |
subject.msg <- paste0("Error Subject, ", format(Sys.time(), "%A %d %B %Y %X")) | |
from <- "sender@mail" | |
body <- geterrmessage() | |
mailControl = list(smtpServer = "mail.server.com", smtpPort = "25") | |
sendmail(from = from, | |
to = c("[email protected]","[email protected]"), | |
subject = subject.msg, | |
msg = body, | |
control = mailControl) | |
flog.error(geterrmessage()) | |
traceback() | |
stop() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment