mailgun: mailgun factory

Description Usage Format Examples

Description

Creates an 'IMmailgun' object that allows you to send emails and retrieve stats from your mailgun account.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(IMmailgun)
url <- "https://api.mailgun.net/v3/email.ignacio.website"
key="~/.ssh/id_rsa"
api_key <- secret::get_secret("mailgun", key = key,
vault = file.path(system.file(package = "IMSecrets"),
"vault/"))[[1]]
from="IMSecrets <postmaster@email.ignacio.website>"
email_client <- mailgun$new(url = url, api_key = api_key, from = from)
email_client$sendEmail(to = c("ignacio82@gmail.com", "ignacio@protonmail.com"),
subject = "Test", plaintext = "Hola!")

## End(Not run)

IMmailgun documentation built on May 1, 2019, 8:20 p.m.