SendOutlookMail: Send a Mail Using Outlook as Mail Client

Description Usage Arguments Value Author(s) See Also Examples

View source: R/DescTools.r

Description

Sending emails in R can be required in some reporting tasks. As we already have RDCOMClient available we wrap the send code in a function.

Usage

1
SendOutlookMail(to, cc = NULL, bcc = NULL, subject, body, attachment = NULL)

Arguments

to

a vector of recipients

cc

a vector of recipients receiving a carbon copy

bcc

a vector of recipients receiving a blind carbon copy

subject

the subject of the mail

body

the body text of the mail

attachment

a vector of paths to attachments

Value

Nothing is returned

Author(s)

Andri Signorell <andri@signorell.net> strongly based on code of Franziska Mueller

See Also

ToXL

Examples

1
2
3
4
5
6
7
## Not run: 
SendOutlookMail(to=c("me@microsoft.com", "you@rstudio.com"), subject = "Some Info", 
                body = "Hi all\r Find the files attached\r Regards, Andri", 
                attachment = c("C:/temp/fileA.txt", 
                               "C:/temp/fileB.txt"))

## End(Not run)

DescTools documentation built on June 17, 2021, 5:12 p.m.