Giter Site home page Giter Site logo

emayili's Introduction

emayili

Travis-CI build status Codecov test coverage Lifecycle: experimental CRAN

emayili is a package for sending emails from R. The design goals are:

  • works on all manner of SMTP servers and
  • has minimal dependencies (or dependencies which are easily satisfied).

The package name is an adaption of the Zulu word for email, imeyili.

Installation

At the moment you need to install the development version the {curl} package.

remotes::install_github("jeroen/curl")

Then install {emayili}.

remotes::install_github("datawookie/emayili")

Usage

First create a message object.

library(emayili)
library(magrittr)

email <- envelope()

Add addresses for the sender and recipient.

email <- email %>%
  from("[email protected]") %>%
  to("[email protected]") %>%
  cc("[email protected]")

There are also bcc() and reply() functions for setting the Bcc and Reply-To fields.

Add a subject.

email <- email %>% subject("This is a plain text message!")

Add a body.

email <- email %>% body("Hello!")

Add an attachment.

email <- email %>% attachment("image.jpg")

Create a SMTP server object and send the message.

smtp <- server(host = "smtp.gmail.com",
               port = 465,
               username = "[email protected]",
               password = "bd40ef6d4a9413de9c1318a65cbae5d7")
smtp(email, verbose = TRUE)

Using STARTTLS security protocol

If you’re trying to send email with a host that uses a STARTTLS security protocol (like Google Mail or Yahoo!), then it will most probably be blocked as it’s not enough secure. In order to circumvent this, you can grant access to less secure apps:

Similar Packages

There is a selection of other R packages which also send emails:

emayili's People

Contributors

abichat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.