mail_send: Send Emails with Attachments (POST)

View source: R/mails.R

mail_sendR Documentation

Send Emails with Attachments (POST)

Description

This function lets the user send Emails with Attachments using MailGun's API service.

Usage

mail_send(
  from = "RMail <laresbernardo@gmail.com>",
  to = "laresbernardo@gmail.com",
  cc = NULL,
  bcc = NULL,
  subject = "Mail from R",
  text = " \n",
  html = NULL,
  attachment = NULL,
  service = "mailgun",
  creds = NULL,
  quiet = FALSE,
  ...
)

Arguments

from, to, cc, bcc

Character. Emails

subject

Character. Subject for the email.

text, html

Character. Text or HTML to send in the body.

attachment

Character, plot or data.frame. Will send the file, plot as PNG or data.frame as CSV, respectively.

service

Character. Service platform to search on creds.

creds

Character. Credential's user (see get_creds()). Must contain: url (POST address), api (API key).

quiet

Boolean. Keep quite or display messages?

...

Additional parameters.

Value

No return value, called for side effects.

See Also

Other Tools: autoline(), bind_files(), bring_api(), chr2num(), db_download(), db_upload(), export_plot(), export_results(), files_functions(), font_exists(), formatColoured(), formatHTML(), get_credentials(), glued(), grepm(), h2o_selectmodel(), haveInternet(), image_metadata(), importxlsx(), ip_data(), json2vector(), list_cats(), listfiles(), markdown2df(), move_files(), msplit(), myip(), quiet(), read.file(), statusbar(), tic(), try_require(), updateLares(), warnifnot(), what_size()

Other Credentials: db_download(), db_upload(), get_credentials(), get_tweets(), queryDB(), queryGA(), slackSend(), stocks_file()

Examples

## Not run: 
myPlot <- noPlot("My plot")
mail_send(
  from = "BLV <myuser@mail.com>",
  to = "youruser@mail.com",
  cc = "myuser@mail.com",
  subject = paste("Daily report:", Sys.Date()),
  attachment = myPlot
)

## End(Not run)

lares documentation built on Sept. 13, 2024, 1:08 a.m.