Skip to main content

A super simple CLI for sending emails

Project description

Netlify Status MIT license Coverage Status Build Status GitSpo Mentions

Maildown

A super simple CLI for sending emails

Introduction

Maildown is a command line interface that lets you send emails using Amazon AWS SES with a minimum of fuss

Why can't I just use boto3?

Maildown makes it easier to add structure and style to your email content. It supports Markdown syntax out of the box, meaning that you can just send Markdown files as emails with no additional effort.

How much does it cost?

Maildown is open source and therefore completely free. It relies on Amazon SES, which isn't completely free, but it does let you send up to 62,000 free emails per month (when sent from an EC2 instance). So for the vast majority of people, Maildown costs nothing to run.

Installation and usage

Pre requisites

In order to use Maildown, you first need to create an AWS free tier account here. Once you've signed up, you'll also realistically need to take your AWS SES account out of the sandbox

Install with pip

You can install maildown as follows:

pip install maildown

Authenticating Maildown

Maildown stores your credentials locally for convenience. Before you can use Maildown's features, you should run the maildown init command

maildown init AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY

If you have previously used the aws cli and have already run aws configure, or if you have set the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in your environment, you can just use maildown init with no arguments to store your credentials

Verify email addresses

Amazon only lets you send emails from verified email addresses - In other words, you need to verify that you own your email address before you can send mails from it. You can either do this from the SES console, or by using Maildown:

$ maildown verify christopherdavies553@gmail.com
Email sent to christopherdavies553@gmail.com. You must click the link in this email to verify ownership before you can send any emails

When you use the above command, AWS will send an email to the email address you provided. You'll need to click on the link to verify your ownership of the account. Once you've done this, you can repeat the previous command to check the status

$ maildown verify christopherdavies553@gmail.com
This email address has already been verified

You are now ready to start sending emails!

Sending emails

You can now send emails with the following command

maildown send christopherdavies553@gmail.com "my email subject" -f "email.md" recipient1@gmail.com recipient2@gmail.com

The above arguments, in order, are:

  • The sending email address (which must have been verified)
  • The subject line of your email
  • A markdown file containing some content to send. Note that you can also use the -c flag to pass string content to be sent directly to the email, e.g. -c "hello"
  • A list of email addresses to send the content to

Contributing

If you'd like to contribute to this codebase, the latest dev builds kept in a Private python package repository on RepoForge.io. Get in touch to request access to these

Styling emails

By default, Maildown bakes in its own default style sheet when sending emails. This looks something like this (the below email is the content of this readme):

screenshot

You can apply your own styles by simply using the --theme flag when sending mails, like this:

maildown send christopherdavies553@gmail.com "my email subject" -f "email.md" --theme "my-style.css" recipient1@gmail.com recipient2@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maildown-1.4.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

maildown-1.4.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file maildown-1.4.0.tar.gz.

File metadata

  • Download URL: maildown-1.4.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.0.0

File hashes

Hashes for maildown-1.4.0.tar.gz
Algorithm Hash digest
SHA256 eef25d4ce20823927257aa4b91ad0da2de38ca8aeeeef0cdc049f9faff053aff
MD5 868e8769182edf3057a57310d7294a74
BLAKE2b-256 d9b8a126c007b1d9f40439b245f044d805bb1611c0daf1831dc41d9817910b02

See more details on using hashes here.

File details

Details for the file maildown-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: maildown-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.0.0

File hashes

Hashes for maildown-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a246b2f4bd9923149184a9054d1c13cf3913df49d01bf62ba47ceb07433c8a
MD5 4fd149b8e451f27cb9d3d8a34a5107b8
BLAKE2b-256 fa13dcb2914bd2f31fe45d4ad220ff4654ba8895b04f855d5158985ddea938bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page