MyNixOS website logo
Description

Send Emails using 'Mailgun'.

Send emails using the 'mailgun' api. To use this package you will need an account from <https://www.mailgun.com> .

IMmailgun

The goal of IMmailgun is to make sending emails from R easy. To use it, you will need a mailgun account.

Example

This is a basic example which shows you how to solve a common problem:

library(IMmailgun)
email_client <- mailgun$new(url = url, api_key = api_key, from = from)

email_client$sendEmail(to = c("[email protected]", "[email protected]"), 
                       subject = "Test", plaintext = "Hola a todos!")
#> [[1]]
#> Response [https://api.mailgun.net/v3/email.ignacio.website/messages]
#>   Date: 2017-11-18 13:59
#>   Status: 200
#>   Content-Type: application/json
#>   Size: 109 B
#> {
#>   "id": "<[email protected]>",
#>   "message": "Queued. Thank you."
#> 
#> [[2]]
#> Response [https://api.mailgun.net/v3/email.ignacio.website/messages]
#>   Date: 2017-11-18 13:59
#>   Status: 200
#>   Content-Type: application/json
#>   Size: 110 B
#> {
#>   "id": "<[email protected]>",
#>   "message": "Queued. Thank you."

Add attachemt


email_client$sendEmail(to = "[email protected]", 
                       subject = "Test with attachment", 
                       plaintext = "Check the attachment",
                       attachment = './README.md')
#> [[1]]
#> Response [https://api.mailgun.net/v3/email.ignacio.website/messages]
#>   Date: 2017-11-18 13:59
#>   Status: 200
#>   Content-Type: application/json
#>   Size: 109 B
#> {
#>   "id": "<[email protected]>",
#>   "message": "Queued. Thank you."

Get stats

email_client$stats()
#>                 id  event total_count created_at
#> 1 512b93ba0c7f0ab9 opened           1 2017-11-18
#> 2 5cc697702a96e913 opened           1 2017-11-16
#> 3 39f91001065c7cca opened           6 2017-11-15
#> 4 ede64ad2596dc9a5 opened           3 2017-11-14
Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows