Skip to content

Simple API for sending templated e-mails

Notifications You must be signed in to change notification settings

Unholster/mailroom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailroom

Mailroom is a service that allows sending templated e-mails.

Currently supports:

  • Single e-mail per job
  • Templating using Jinja2
  • Storing templates on server
  • Send through SMTP, configurable by env var
  • Postgres backend
  • Expose handler function compatible with AWS serverless stack (API Gateway, AWS Lambda)
  • Supports multiple attachments (i.e. plain text + html text versions)

Running locally

# Run with defaults
MAIL_URL=smtp://user:pass@server:port poetry run mailroom

Send an e-mail

curl \
    -H content-type:application/json \
    -d '{"template": { "from": "sacuna@gmail.com", "to": ["sacuna@gmail.com"], "subject" : "Hello {{first_name}}", "body": "Greetings {{first_name}} {{last_name}}"}, "data": [{"first_name": "Seba", "last_name": "acuna"}]}' \
    -X POST \
    http://localhost:5000/jobs

About

Simple API for sending templated e-mails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published