Add the default e-mail logger

  label =["nodename"],
  test = FALSE



Arguments to be passed to the sendmail function in the sendmailR package (except subject and msg).


A label to be used in the e-mail subject to identify a run. By default the name of the computer is used.


A name for the logger.


If TRUE, a message will be displayed on the console instead of sending an e-mail.


Creates a logger that writes to e-mail using the "FATAL" threshold and the layoutEmail layout. This function uses the sendmailR package. Please make sure your e-mail settings are correct by using the sendmailR package before using those settings here. ParallelLogger will not display any messages if something goes wrong when sending the e-mail.

Using GMail

To use a GMail account, make sure to enable 2-step verification on your Google account (see 'Security'). Click on 2-Step Verification, and scroll down to 'App passwords'. Here, you can create an app-specific password to be used with ParallelLogger. You can set = "", and be sure to use engine = "curl".


mailSettings <- list(
  from = "",
  to = "",
  engine = "curl",
  engineopts  = list(
    username = "",
    password = "Secret!"
  control = list( = ""

# Setting test to TRUE in this example so we don't really send an e-mail:
addDefaultEmailLogger(mailSettings, "My R session", test = TRUE)
#> Error: 'sendmailR' must be installed for this functionality.
logFatal("Something bad")

#> Warning: Could not find logger DEFAULT_EMAIL_LOGGER
#> [1] FALSE