GitHub - chris104957/maildown: A super simple CLI for sending emails
source link: https://github.com/chris104957/maildown
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
Maildown
A super simple CLI for sending emails
Introducion
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. So for 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 runaws configure
, or if you have set the environment variablesAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
in your environment, you can just usemaildown 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 [email protected] Email sent to [email protected]. 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 [email protected] 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 [email protected] "my email subject" -f "email.md" [email protected] [email protected]
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
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):
You can apply your own syles by simply using the --theme
flag when sending mails, like this:
maildown send [email protected] "my email subject" -f "email.md" --theme "my-style.css" [email protected] [email protected]
Recommend
-
43
You probably found this tutorial because you want to send emails using Python. Perhaps you want to receive email reminders from your code, send a confirmation email to users when they create an account, or send emails to...
-
30
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...
-
3
MFMailComposeViewController provides an easy way to present a view controller, that allows to write, edit and send an email. It’s presented modally, so the context of the app won’t be left. Hint: This post is using Swift 4 and iOS...
-
8
Sending Threaded Emails Using Rails ActionMailer
-
5
MFMailComposeViewController – sending emails from an iOS app MFMailComposeViewController provides an easy...
-
5
Sending dynamic emails from a centralized mailer May 30 ・1 min read ...
-
13
Sending Emails with Amazon SES and Spring Cloud AWSEmail is a convenient way to communicate different kinds of events from applications to interested parties. Amazon Simple Email Service (SES) is an email platform that provides an eas...
-
4
Sending Emails with Google Sheets & Scripts Google Sheets and Google Scripts have been a powerful combo for me...
-
21
Sending Emails using PythonSending Emails using PythonPython is one of the most preferred programming languages to automate tasks and an interesting example of this is sending emails using Python language. Pyt...
-
4
Sending email notifications from GitHub organisations to different emails Tuesday, February 1st, 2022 at 12:37 am I’m part of a few organisations on GitHub and had one email...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK