sendGmail: Send an email from a gmail account

View source: R/email.R

sendGmailR Documentation

Send an email from a gmail account

Description

Requires running 'setupEmail' first. This function is called after some other code runs, or whenever you like.

Usage

sendGmail(gmailAcct, subj, msg, sendToEmail)

Arguments

gmailAcct

Character string containing the name of the gmail account to send the Email from (the same account you used in 'setupEmail'). DO NOT include the '@gmail.com' part, just the account up to there.

subj

Character string: the desired subject line

msg

Character string: the desired message

sendToEmail

Character string with the recipient Email (e.g., "smith@smithsdomain.com", etc.). Unlike, 'gmailAcct', here you have to specify the entire Email, i.e. including the @whatever.xxx part.

Value

Nothing. It just sends the Email

Examples

  setupGmail ("mygmailacct")
  # Notice that "mygmailacct" must be the same one used when you
  # ran 'setupEmail'
  sendGmail(gmailAcct="mygmailacct",
            subj="Your model is done",
            msg="V.10.1 model completed",
            sendToEmail="anyoldEmail@whatever.com")


johninpdx/JMLUtils documentation built on Dec. 29, 2024, 1:27 p.m.