NOTE: If you are running the hosted version of Mautic, this post probably doesn’t apply to you. You are welcome to anything you find useful here, but my entire series is for those hosting their own Mautic instance.
This is the second post in a series titled “My Journey into Mautic”. If you are starting here, you might get an incomplete picture, you may want to check out the previous articles.
There are two things that really confuse me about Mautic, properly configuring an Email Service Provider (ESP), and segmenting & tagging. We’ll tackle the latter one in a later post, but the former is an important topic. It is also one that I do not fully understand. What is presented here is what I have learned through trial and error. it my be partially or wholly incorrect. If you find something that I’ve gotten wrong, please, by all means, correct me in the comments.
What is an ESP?
An ESP is an Email Service Provider. What once was just a service running on a server, is now a service you can pay for instead of having to manage yourself. Trust me, it’s worth it to pay for this one. :)
I ran my own mail server for around 15 years. I understand exactly how difficult it is to manage a secure and well maintained email server. I finally decided I had had enough and moved all of my personal email over to Google Apps. Life has been so much simpler since then. :) The only problem that I have run into is that many of my programs – or other websites running WordPress – need to be able to send email. It also helps f they can receive email as well, but that’s not imperative to me.
After testing out several good solutions, I settled on MailGun by RackSpace for all of my “transnational emails”.
Transactional vs. Broadcast emails
Transactional emails are any emails that your system generates that are not “broadcast” emails. Broadcast emails are things like mailing lists, etc where you send the same message out to a bunch of email addresses all at once. MailGun is not a good solution for that. For those types of emails, I use MailChimp. There are other good providers out there but I’ve settled on MailChimp.
Trasnactional emails are everything from receipts sent from an eCommerce shop to lost password emails. In the case of Mautic, transactional emails are marketing emails, but they are not “broadcast” emails as described above. In a traditional drip campaign, the emails are sent one at a time. Depending on the popularity of your campaign, you might be sending a lot of them one at a time, but in the end they are still one at a time. These are still transactional emails.
Sending and Receiving
Since I already had MailGun setup and operational I wanted to stick with it. Unfortunately, Mautic does not support MailGun‘s API out of the box. It does however support “Other SMTP” which allows me to still use MailGun. I would prefer to use the API over SMTP because with SMTP, I have to open another port in my firewall. However, it is still better than trying to setup ANOTHER ESP, just for Mautic. Hopefully, Mautic will support MailGun‘s API in the near future.
Out of the box, Mautic supports the following ESP vendors:
- Amazon SES
- Elastic Email
- GMail *
- Other SMTP Server **
- PHPMail ***
* Gmail is not an API, you give it your Gmail’s account credentials and it will send from that.
** Same as Gmail, except that you have to define all the different parameters yourself.
*** PHP’s Built in
If you use one of those ESPs for sending, Mautic is good. If you don’t, you will need to configure everything. The good news, is that it is not terribly difficult to guess the right values to use. The bad news is, yes, there is a little guess work involved.
Step 1 – Firewall
Since I am running Mautic self hosted, and using a non-standard ESP, I have to open up the proper ports on my firewall before anything can be done. This of course did not occur to me until after I had properly configured Mautic and then tinkered with it for half an hour to try and get it to work. :) So if you are self hosting, and you are using a non-standard ESP, make sure you configure your firewall first. In my case, this mean
Step 2 – Configure Send
Now it’s time to tell Mautic to use MailGun to send things. Here is what the screen looks like.
- Name to send mail as – This is pretty obvious but in case it is not, this is the default
- Email address to send mail from – Similar to name, this can be overridden if you want, but this is the default.
- Custom return path (bounce) address – I believe this is the email address you want bounces to go to. I am not entirely sure and since I want bounces to be processed normally, I left it blank.
- Mailer is Owner – This is where you override the first to, I think. Since my setup only has a single user, it is easy for me to just leave this off and use the defaults.
- Service to send mail through – Pick from the list above. Since mine isn’t in the list, I chose other.
- SMTP host – You get this from your ESP. Note, if you are using a supported ESP and they have an API, your choices will be different. Usually for those, you’ll just enter in your API credentials.
SMTP encryption – None, SSL or TLS. Check with your ESP. HINT: None should never be your option. If it is,
find a better ESP.
- SMTP port – This will vary based on your encryption choice.
- SMTP authentication mode – This determines how your let your SMTP server know who you are so it can determine whether you are allowed to send mail through it. Your choices are “None”, “Plain”, “Login”, or “Cram-MD5”
- User name and password – Since I am using SMTP and I told it to use Login, these fields allow me to provide the username and password for MailGun.
- How should email be handled – This one I guessed at. Since I almost always want my emails to be sent immediately when a customer fills out a form, I set it to immediately. I’ll be honest in saying that I don’t know the ramifications – if any – of this decision. The other option is “Queue”. My assumption is that if Queue is selected, then the cron jobs (another post) will deal with it.
Step 3 – Configure Receive
Here is where I get confused. Also where I think using an ESP with a supported API might make things easier. Then again, maybe not since most transactional ESPs don’t support receiving. Still, this part confuses the heck out of me. Apparently, here we have to configure an incoming ESP. MailGun handles this for me by use of aliases, but here, Mautic wants an actual email address and access to it. Then – if I understand it correctly – you have to configure folders for bounces and unsubscribes.
I have a couple of questions that I can’t seem to find the answers to.
- Do I have to set the email address of this box up in Custom return path (bounce) address?
- Do I have to setup the separate folders?
- Is it considered a best practice to set them up?
- Is there a size threshold (e.g. 2+ users where it becomes important to set the folders up?
- Exactly what are the folders for?
In the end, I used a GMAIL I setup just for this purpose. I left the folder set to INBOX on both of them. It seems that you can also setup separate email addresses for bounces and unsubscribes. I used the single default settings for this. However, I am sure on larger installations, it would be a good idea to have different email addresses for each.
As I said at the start, I’m sure I got some of these wrong. I look forward to those with a lot more knowledge correcting me so I can correct this post…and my Mautic installation. In setting up Mautic, setting up an ESP was the most confusing and time consuming.
Part of my confusion was of my own making. Since MailGun wasn’t supported, I decided to spend some time looking at other ESPs. Of all the ones I looked at PostMarkstood out as exemplary. Honestly, the only think that kept me from implementing them is I am cheap and MailGun gives me ten thousand sends/receives a month. PostMark only gave me twenty five thousand, total free. By my calculation, that’s about a years worth of free service for me, so it’s not a bad deal at all. Also, the pain of switching everything over or running two separate ESPs was enough to keep me where I was. If you haven’t selected an ESP, give PostMark a look.
If you can make it through this, the rest of the configuration is a breeze. :)
Until next time,
I <3 |<