R/email_create.R

Defines functions email_create

Documented in email_create

#' Email create
#'
#' @param To
#' @param From
#' @param Subject
#' @param body
#' @param attachment
#'
#' @import gmailr
#' @imoprt
#'
#' @return
#' @export
#'
email_create = function(To, From, Subject, body, attachment){

  gm_mime() %>%
    gm_to(To) %>%
    gm_from(From) %>%
    gm_subject(Subject) %>%
    gm_text_body(body) %>%
    gm_attach_file(filename = attachment)

}
P8105/p8105.helpers documentation built on Sept. 15, 2022, 9:31 p.m.