Skip to contents

to(), cc(), bcc() is for set email address to sg_mail class

Usage

to(sg_mail, email, name = "")

cc(sg_mail, email, name = "")

bcc(sg_mail, email, name = "")

Arguments

sg_mail

(required)mail object from package

email

(required)email address

name

(optional)name for email address.

Value

sg_mail class with mail address.

Examples

mail() %>%
  to("mrchypark@gmail.com")
#> SendGrid Mail - 
#>    from   : (required)
#>    to     : cnt[1] mrchypark@gmail.com
#>    subject: (required)
#>    content: (required)
#>    attach : (optional)

mail() %>%
  cc("mrchypark@gmail.com")
#> SendGrid Mail - 
#>    from   : (required)
#>    to     : (required)
#>    cc     : cnt[1] mrchypark@gmail.com
#>    subject: (required)
#>    content: (required)
#>    attach : (optional)

mail() %>%
  bcc("mrchypark@gmail.com")
#> SendGrid Mail - 
#>    from   : (required)
#>    to     : (required)
#>    bcc    : cnt[1] mrchypark@gmail.com
#>    subject: (required)
#>    content: (required)
#>    attach : (optional)