All Projects → rstudio → Blastula

rstudio / Blastula

Licence: other
Easily send great-looking HTML email messages from R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Blastula

Cli
Get a programmable email address. Automate what happens when you receive emails. It's like Zapier for devs who hate emails.
Stars: ✭ 105 (-73.35%)
Mutual labels:  easy-to-use, email, smtp
mailx
A lightweight SMTP mail library
Stars: ✭ 17 (-95.69%)
Mutual labels:  email, smtp
go-simple-mail
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.
Stars: ✭ 298 (-24.37%)
Mutual labels:  email, smtp
mjml-syntax
Sublime package for the MJML
Stars: ✭ 44 (-88.83%)
Mutual labels:  email, responsive-email
bulk-email-sender
Send Templatized Dynamic Emails Automatically
Stars: ✭ 30 (-92.39%)
Mutual labels:  email, easy-to-use
Mail
基于 Net.Mail 封装的发送邮件工具类。仅需一行代码,发送邮件。支持自定义邮件发出邮箱、发出方名字等。 支持SSL加密发送。 多个接收人、抄送人。支持群发独显。 支持添加附件、多个附件。 目前大部分主流邮箱全支持。
Stars: ✭ 87 (-77.92%)
Mutual labels:  email, smtp
yggmail
End-to-end encrypted email for the mesh networking age
Stars: ✭ 72 (-81.73%)
Mutual labels:  email, smtp
email
Aplus Framework Email Library
Stars: ✭ 127 (-67.77%)
Mutual labels:  email, smtp
ESP-Mail-Client
⚡️Arduino Mail Client Library to send, read and get incoming mail notification for ESP32, ESP8266 and SAMD21 devices. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.
Stars: ✭ 78 (-80.2%)
Mutual labels:  email, smtp
Notqmail
Collaborative open-source successor to qmail
Stars: ✭ 255 (-35.28%)
Mutual labels:  email, smtp
Magento2 Gmail Smtp App
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers
Stars: ✭ 281 (-28.68%)
Mutual labels:  email, smtp
Smart-Mass-Mailer
Smart Bulk Email Sender with Mail Merge, Delay between Emails and HTML Content
Stars: ✭ 51 (-87.06%)
Mutual labels:  email, smtp
mail
Actively maintained fork of gomail. The best way to send emails in Go.
Stars: ✭ 376 (-4.57%)
Mutual labels:  email, smtp
DANE-for-SMTP
'DANE for SMTP' wiki
Stars: ✭ 28 (-92.89%)
Mutual labels:  email, smtp
emailpyspam
A python 3+ program to spam emails to a list of users repetitively
Stars: ✭ 63 (-84.01%)
Mutual labels:  email, smtp
go-html-email
Sending HTML email using Go 💌
Stars: ✭ 31 (-92.13%)
Mutual labels:  email, smtp
Deltachat Core Rust
Delta Chat Rust Core library, used by Android/iOS/desktop apps and bindings
Stars: ✭ 300 (-23.86%)
Mutual labels:  email, smtp
Hacktoberfest
Participate in Hacktoberfest by contributing to any Open Source project on GitHub! Here is a starter project for first time contributors. #hacktoberfest
Stars: ✭ 631 (+60.15%)
Mutual labels:  markdown, easy-to-use
Markdown Css
A tool convert css style into markdown inline style
Stars: ✭ 122 (-69.04%)
Mutual labels:  markdown, easy-to-use
tmail
A throwaway smtp server with API
Stars: ✭ 13 (-96.7%)
Mutual labels:  email, smtp

blastula

CRAN status Travis-CI Build Status Codecov test coverage

Overview

The blastula package makes it easy to produce and send HTML email from R. The message can have three content areas (the body, the header, and the footer) and we can insert Markdown text, block-based components, and even HTML fragments. The underlying HTML/CSS is meant to display properly across a wide range of email clients and webmail services. The resulting email message is responsive so it’ll look great on both large displays and mobile devices.

Composing an Email Message

When you compose an email, you can use objects from the global workspace and work them into the message content. Let’s create a nicely formatted date/time string (date_time) with the add_readable_time() function, and, transform an image on disk to an HTML string object (img_string).

# Get a nicely formatted date/time string
date_time <- add_readable_time()

# Create an image string using an on-disk
# image file
img_file_path <-
  system.file(
    "img", "pexels-photo-267151.jpeg",
    package = "blastula"
  )

img_string <- add_image(file = img_file_path)

Now we use the compose_email() function to compose the email. There are three main arguments here: body, header, and footer. You can supply Markdown text to any of these content areas to get rendered HTML.

In the example code below, the strings that are part of the email body and the email footer are combined with c() and, since we have Markdown and HTML fragments, we need to use the md() function.

email <-
  compose_email(
    body = md(
      c(
"Hello,

This is a *great* picture I found when looking
for sun + cloud photos:
",
img_string
      )
    ),
footer = md(
  c(
    "Email sent on ", date_time, "."
  )
)
  )

After creating the email message, we can look at it to ensure that the formatting is as expected. Simply call the object itself and it will be displayed in the Viewer.

# Preview the email
email

Sending an Email Message via SMTP

We can store SMTP email credentials in a file using the create_smtp_creds_file() function. This will create a hidden credentials file in the working directory. We can also set SMTP access credentials in the system-wide key-value store through the create_smtp_creds_key() function.

Having generated a credentials file, we can use the smtp_send() function (along with the creds_file() credentials helper function) to send the email through an SMTP server.

# Sending email by SMTP using a credentials file
email %>%
  smtp_send(
    to = "[email protected]",
    from = "[email protected]",
    subject = "Testing the `smtp_send()` function",
    credentials = creds_file("email_creds")
  )

Installation

The blastula package can be installed from CRAN with install.packages().

install.packages("blastula")

You can install the in-development version of blastula from GitHub using the devtools package.

install.packages("devtools")
devtools::install_github("rstudio/blastula")

If you encounter a bug, have usage questions, or want to share ideas to make this package better, feel free to file an issue.

Code of Conduct

Please note that the blastula project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

MIT © RStudio, PBC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].