R/e_mail.R

Defines functions e_mail

Documented in e_mail

#' Make json list of emails
#'
#' Make json list of emails from character vector
#'  strings test for email format to be added
#'
#' @param ... list of characters
#' @keywords regex
#' @keywords or
#' @keywords string
#' @export
#' @examples
#' msg_txt('hello','world!','','goodbye!')
#
e_mail <- function(...) {
  a <- unlist(eval(substitute(alist(...))))
  # print(a)
  stopifnot(!is.null(a[[1]]))
  jsonlite::toJSON(data.frame(email = a, stringsAsFactors = FALSE))
}
# jsonlite::toJSON(data.frame(email = readers))
barvinch/sendRgrid documentation built on Dec. 31, 2022, 8:48 p.m.