close
Skip to content

DK26/osa-mailer

Repository files navigation

osa-mailer

Send dynamic and sophisticated E-mails using Smart Templates

Guidebook | Discussions

Build Security Audit & License Compatibility pages-build-deployment

Download Alpha 3 (i686-pc-windows)

Features

  • Currently supports 3 template engines: tera, handlebars and liquid
  • Automatically attaches all your HTML resources to the SMTP message
  • Provides you the ability to aggregate multiple E-mails of the same subject and recipients, into a single E-mail with accumulated context
  • Supports multiple SMTP connection types: NOAUTH, TLS and STARTTLS

Supported Template Engines

Name Short / File Extension Version Guide / Manual / Tutorial
Tera tera v1.18.1 https://tera.netlify.app/docs/#templates
Handlebars hbs v4.3.6 https://handlebarsjs.com/guide/
Liquid liq v0.26.1 https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

How it Works

OSA-Mailer uses asynchronous approach for sending E-mails, sacrificing realtime notifications in favour of increasing feature capabilities.

This enables OSA-Mailer the merge of multiple E-mails context of the same recipients, craft beautiful and sophisticated E-mails, using rendering engines, and some other future ideas that are on the table (such as timed or conditioned E-mail messages). It also enables resending E-mails in case of an error, or using other mitigation methods.

Workflow

  1. An external tool is creating and writing a formatted E-mail send requests (JSON file) into the outbox directory (refer to the send_email_request python scripts for examples)
  2. The OSA-Mailer service is pulling every X configured seconds for new E-mail send requests found within the outbox directory
  3. OSA-Mailer calculates an E-mail ID for each request base-off its email section and effectively merging dynamic context values
  4. It then composes an SMTP message using the provided HTML template, rendering it with the chosen rendering engine against the merged context, allowing for a dynamic E-mail creation, while automatically loading all related resources (images) used within that HTML template
  5. It sends out the final SMTP E-mail message, using the configurations within the osa_mailer.cmd file

Quick Template Engines Guide

Tera (click to expand)

A highly advanced, capable and secure by default; rendering engine that follows the OWASP Top 10 guidelines. A good alternative choice if you are used to template engines such as Jinja2, Django, Liquid or Twig. Originated in the Rust programming language.

Handlebars (click to expand)

A highly popular rendering engine that has been implemented across many programming languages. Considered to be somewhat more limited in features compared to the other engines. Originated in the Javascript programming language.

Liquid (click to expand)

A highly advanced, capable and senior rendering engine, offering some optional security capabilities. A good alternative choice if you are used to the smarty template engine. Originated in the Ruby programming language.

Template Design & Preview

Try the rendit CLI tool

Prototype Note

This is still an MVP (Minimal Viable Product) and there is still work to be done and features to be added. Features may be added or removed later with no notice (but typically documented in the changelog notes of each release)

License

MIT

About

Send dynamic and sophisticated E-mails using Smart Templates

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors