Skip to content

Commit

Permalink
Create email to, cc, bcc from vector of emails
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitoshina authored Feb 22, 2024
1 parent 629fdc6 commit b082899
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/gm_mime.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ gm_to.mime <- function(x, val, ...) {
if (missing(val)) {
return(x$header$To)
}
if (length(val) > 1) {
x$header$To <- paste(val, collapse=",")
return(x)
}
x$header$To <- val
x
}
Expand All @@ -61,6 +65,10 @@ gm_cc.mime <- function(x, val, ...) {
if (missing(val)) {
return(x$header$Cc)
}
if (length(val) > 1) {
x$header$Cc <- paste(val, collapse=",")
return(x)
}
x$header$Cc <- val
x
}
Expand All @@ -71,6 +79,10 @@ gm_bcc.mime <- function(x, val, ...) {
if (missing(val)) {
return(x$header$Bcc)
}
if (length(val) > 1) {
x$header$Bcc <- paste(val, collapse=",")
return(x)
}
x$header$Bcc <- val
x
}
Expand Down

0 comments on commit b082899

Please sign in to comment.