Skip to main content

4 steps toward hosting your own Email Marketing Platform.

· 5 min read
This post was originally published by me here

If you have an existing email platform such as MailChimp or Sendgrid, it probably integrates with your CRM to a certain extent (I wouldn’t class CSV exporting as integration BTW).

At Gather Digital, I put together our in-house CRM using Pimcore; it’s unconventional but since we created a Workflow Management plugin we have had total control over all of the data within the business, and can keep track of notes, conversations and emails easily. Pimcore has given us the flexibility to do whatever we need to do with our data — without having to watch the monthly costs or subscriptions; I believe if we build tools generically, we will save in the long term, hence the effort.

One of the latest problems I wanted to solve, was to make sure that we manage transactional emails and newsletters properly. We haven’t sent many newsletters in the past but this year is going to be very different, and potentially we could be sending thousands per day to or on behalf of our clients. So after solving the problem, here’s the four steps to self-hosting an email marketing platform.

1. Use Pimcore to maintain contacts & subscriptions

Grab a copy of Pimcore, and install it on a server somewhere (EC2 maybe). Pimcore has CRM fields built straight into its flexible data modelling, and ships with components to help maintain unsubscribes or double opt-in subscriptions. You can have a contact list imported within a few minutes (Providing you know how to install it). Download Pimcore

2. Take advantage of Pimcore Email Framework

Use the Document Management (specifically email documents) and newsletter management that ships with Pimcore, to create responsive email templates with WYSIWYG editing. A developer can quickly code up an email design as a web page (or you can use a template from elsewhere), content marketers can then use editable document regions to enter email content for a campaign.

Text placeholders can be used to personalise emails and change content dynamically, so each message sent can be tailored to the recipient.

3. Send email using Amazon SES

Hook up your domain to Amazon SES to take advantage of world-class infrastructure for email sending for a tiny cost. Set up Pimcore to point to an SMTP SES account, and you’ll soon be able to send up to 50k emails per day — providing you comply with their Best practice and submit a support ticket. See http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html

It’s important that you manage your mailing lists, keeping track of deliveries, email bounces, complaints & unsubscribes. If you’re using Amazon SES for sending an email, it’s a requirement that you do this (be responsible) see http://media.amazonwebservices.com/AWS_Amazon_SES_Best_Practices.pdf

4. Manage SES Deliveries, Bounces and Complaints with SNS

Managing this part is not something that comes out of the box with Pimcore. Although it comes with email blacklisting, the capability to read a bounce inbox, and it automatically removes blacklisted emails from newsletters, it doesn't work with SES. To solve this problem use SNS.

Amazon SNS is a simple notification service that allows you to create a topic (such as email deliveries/bounces from SES), and then subscribe to that topic. Subscribing to a topic is kind of like turning on Push notifications in an app or subscribing to a newsletter. With SNS you can send notifications over HTTP to an app or web service.

I decided to create a plugin for Pimcore so that it can act as a subscriber to SNS notifications, bringing the gap in email management from SES. Now we can get delivery and bounce notifications about emails sent from Pimcore directly back into Pimcore.

cleggypdc/pimcore-plugin-sns-subscriber
An subscriber that can receive Messages from AWS SNS topics, storing messages as a custom persistent model
github.com

It’s an MVP.

Pretty much bare bones at the moment, the plugin just stores the notifications from a topic, and developers have to add a topic to listen to in the database manually. Give me a day or so to develop the rest it’s been a busy first day back.

Here’s a quick to do of things I need to add to the plugin

  • A UI to manage topics
  • The ability to manage SNS notifications in the Pimcore admin (view details, delete individual, clear all, etc.)
  • Event hooks in the plugin so that developers can perform IFTTT functions on notifications.

That last one is crucial to be able to add in automatic email blacklisting and subscription management.

Last point

So it’s not entirely your Mailchimp or Sendgrid, there’s no analytics on open rates, or tracking pixels for instance. But it’s a very powerful solution for managing your email lists in one place and getting insight into where emails go from e.g. Pimcore eCommerce; “Did the customer receive their order confirmation” — yes, there was an SNS delivery notification, which is now attached directly to their order.