Sys.mail {syskern}R Documentation

Send Mail

Description

Uses a system mail tool to send a message. Multiple recipients can be specified in any of the addresses by enclosing them in double (") quotes. Please do not use single (') quotes.

The body is a vector of character. Each element of body is written as a line of the message body.

Usage

Sys.mail(address= Sys.info()$user, ccaddress = NULL, bccaddress = NULL,
           subject = NULL, body= "no body", method = getOption("mailer"))

Arguments

address Recipient's email address. The default is the user name as indicated by Sys.info()$user, which will correspond to your own email address on many systems.
ccaddress Optional email address for copies. Use ccaddress = NULL for no copies.
bccaddress Optional email address for blind copies. Use bccaddress = NULL for no copies.
subject Subject of the email. Please do not use single quotes in the subject!
method Submission method, one of "mailx", "mail", or "Mail".
body A vector of character, one line per element to place in the body of the email.

Details

Currently works only on Unix systems using "mailx", "mail" or "Mail". The mail tool needs to be found on your Unix search path.

Value

TRUE or FALSE indicating success or failure as returned by the operating system. (This does not indicate that the message was received at the address.)

Author(s)

Paul Gilbert

See Also

link{options}

Examples

    Sys.mail(address="friends", subject="R", body="R is great")