Skip to content
/ sg Public

Simple SendGrid Email API client for sending emails with R

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

botan/sg

Repository files navigation

sg

Lifecycle: experimental CRAN status

Simple SendGrid Email API client for sending emails with R.

Installation

Install the released version of sg from CRAN:

install.packages("sg")

Or install the development version from GitHub with:

# install.packages("pak")
pak::pak("botan/sg")

Authentication

Set your API key using the SENDGRID_API_KEY environment variable. The package will automatically detect and use it when sending emails.

Usage

This is a basic example which shows you how to send an email:

library(sg)

sg_mime() |>
  sg_from("[email protected]") |>
  sg_to("[email protected]", "[email protected]") |>
  sg_cc("[email protected]", "[email protected]") |>
  sg_bcc("[email protected]", "[email protected]") |>
  sg_subject("This is the subject") |>
  sg_body("Hello from sg!") |>
  sg_attachments("path/to/file1.csv", "path/to/file2.pdf") |>
  sg_send()

About

Simple SendGrid Email API client for sending emails with R

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages