# Mailanes.com Helps Manage Newsletters and Mailing Lists

Source: https://www.yegor256.com/2018/10/30/mailanes.html

There are other products doing something similar, including
[MailChimp](https://www.mailchimp.com/), [AWeber](https://www.aweber.com/), and
many others. They are great. Maybe. I don't really know. I tried some of them,
some time ago. And I was frustrated. They are expensive, clumsy, and heavy.
That's my experience. I wanted something lightweight, where I can upload
a list of emails, create a simple HTML/text letter, configure my SMTP outbound
server, and call it a day. I spent a few days and created
[Mailanes](https://www.mailanes.com). It's free (for all of you), it's simple,
and it's [open source](https://github.com/yegor256/mailanes/).


First, you login via GitHub (what else, right?) Then you create a List
of Recipients. You add them there one by one or you upload a CSV. Next,
you create a Lane of Letters. A lane is something your recipients should
be moved through, step by step, email by email. Then you create a Campaign
and connect your list with the lane. That's it.

Let me show by example.
Let's say you go to [zerocracy.com](https://www.zerocracy.com), enter your email
and click "Help me start!" The form on the site is configured to post that
email directly to the Mailanes web app (see the [sources](https://www.zerocracy.com/)):

```html
<form method="POST" action="https://www.mailanes.com/subscribe?list=4">
  <input type="hidden" name="source" value="www.zerocracy.com"/>
  <input type="hidden" name="redirect" value="https://www.zerocracy.com/"/>
  <input type="email" name="email" placeholder="Your email..." size="24"/>
  <button type="submit">Help me start!</button>
</form>
```

The `action` of the form points to the `/subscribe?list=4` URL at the Mailanes
server. Once submitted, the recipient will be added to list number 4 and the browser
will be redirected to the URL in the `redirect` form parameter.

Right after the recipient shows up in the list, the system starts moving
him or her through the letters defined in the lane. Try it yourself and you
will receive the first letter almost immediately (in 10 minutes, to be precise).

To define a letter I decided to use [Liquid](https://github.com/Shopify/liquid),
as a pretty simple markup language. For the configuration of lists, lanes, letters
and campaigns I'm using [YAML](http://yaml.org/), since it's rich enough but
way easier and shorter than JSON and, of course, XML. Here is what the
configuration of the first letter you will receive looks like:

{% figure /images/2018/09/mailanes-1.png 600 %}

The `relax` parameter of the letter specifies how much time the system has
to wait after this letter before it sends you the next one. `"4:0:0"` stands
for four days, zero hours, and zero minutes.

At the bottom of the letter I added this:

```html
Thanks,<br/>
Yegor Bugayenko<br/>
Click [here]({{ "{{" }} unsubscribe }}) if you don't want to hear from me again.
```

The `{{ "{{" }} unsubscribe }}` will be replaced by the link to a page where
the recipient of the email will be instantly unsubscribed. I believe it's
good practice to allow your newsletter receivers to unsubscribe instantly.
They will also have the ability to do it via the [`List-Unsubscribe`](https://tools.ietf.org/html/rfc8058)
mail header.

I also configured the lane with my SMTP server details. I'm using
AWS [Simple Email Service](https://aws.amazon.com/ses/).
It's pretty easy to configure and it's inexpensive:
[$1 per 10,000 emails](https://aws.amazon.com/ses/pricing/) at the time of writing.
To my knowledge, [SendGrid](https://sendgrid.com/pricing/)
is two times more expensive,
[Smtp2Go](https://www.smtp2go.com)---six times,
[SendInBlue](https://www.sendinblue.com/pricing/)---four times,
[MailGun](https://www.mailgun.com/pricing)---eight times, etc.:

{% figure /images/2018/09/mailanes-2.png 600 %}

Then, I configured my list to notify me via Telegram about all new subscribers,
unsubscribe actions, etc.:

{% figure /images/2018/09/mailanes-3.png 600 %}

You see, there is the Telegram chat ID where I'm getting notifications. You can
do that too, you just need to know the chat ID. Start talking to the
Telegram bot [@mailanes_bot](https://t.me/mailanes_bot) and it will tell you your chat ID.

I'm using Mailanes for my blog newsletter too. Try to subscribe to it
[here](/about-me.html#subscribe) and you will see what happens.

The [README](https://github.com/yegor256/mailanes/blob/master/README.md) fully
explains all possible configuration options. The project is open, so feel free
to contribute with [pull requests](https://github.com/yegor256/mailanes).
As I said above, it's absolutely _free_
for anyone. Just sign up, create your lists, lanes, and campaigns, and go ahead.

If something is not clear in the system and you are lost, don't hesitate
to [submit a ticket](https://github.com/yegor256/mailanes/issues),
I will try to improve it or add documentation.
