As a developer, when creating an application, you will be faced with an important decision: do you build your own email delivery solution or do you use an email service provider?
Most developers are not experienced at setting up and deploying an email delivery system for their applications. Here are the baseline requirements for an email delivery solution for your application:
- A method of constructing IETF standard email messages
- Emails are reliably delivered into the inboxes of all your users
- Diagnostics and reporting on delivery status and transmission errors
- Collects engagement data for email, such as open and click rates
You will also have to take into account other considerations:
- Do you have the expertise to setup and maintain an email server?
- Do you need any training related to your email platform?
- Are you ready for the potential frustration and headaches that come with building your own solution?
- Do you want the responsibility that comes with running an email server?
Beyond that, we can also compare the resources required to build your own mail solution versus using an email service provider. In this example, we will be using Postfix as a representative email server, typical of what a developer would use.
Now you can compare the number of steps required to get a barebones Postfix server set up compared with using an email service provider.
Setting Up An Email Server |
Using An Email Provider |
|
Rent a server.
You’re going to want to get a server to host your mail server, you can skip this step if you already have a server ready to go. As an example, Linode starts at just $20 per month. |
Sign up for an account.
You go to the registration page and sign up for the account that fits your email sending needs. |
|
Install Postfix.
This can be as simple as doing sudo apt-get install postfix or as difficult as compiling it for your kernel. Much documentation can be found on how to do this. |
|
|
Configure Postfix.
At the very least, you will have to configure the domain name for outbound mail, what clients to relay from, and delivery method. |
|
|
Install DKIM signing.
Most mail providers like Yahoo! or Hotmail will prefer that you have DKIM signatures for your senders. This is not an absolutely vital step, but if you wish to have any sort of reliability in delivery, then this is necessary. |
Install DKIM onto DNS records.
Similar to the build side, DKIM is vital for deliverability. This should be given by the email service provider for you to add to your DNS records. |
|
Set SPF records.
Not exactly part of the Postfix setup process, but you will also need proper SPF records to ensure that your emails are not tagged as spam. |
Set SPF records.
Vital for any email activities. Along with DKIM, ensures that highest possible chance of delivery. |
|
Tune for performance.
Postfix has a great many number of fine tuning options at its disposal, and you can read about all of them here. |
|
|
Debug.
Postfix also has many number of strategies for debugging issues that may occur. You can read about them here. |
|
|
Maintain.
Maintaining Postfix is apparently very easy, all you have to do is monitor the logs for any fatal errors, and use the aforementioned debugging strategies should anything occur. |
|
|
Find an email library that works with your languages or frameworks.
This step can be extremely easy or can be the most annoying part of all. You’ll have to find an email construction library for your particular language or framework that properly constructs email and passes it onto your SMTP server. For example, Swiftmailer for PHP or ActionMailer for Ruby on Rails. |
Find / write an API plugin / library / wrapper.
Choose from one the plugins available or write your own JSON-wrapper for the API. |
|
Integrate library into app.
Taking the library that we found that would work for our language or framework and simply writing all of the emails that would get triggered within the app during user-driven events. |
Integrate plugin / library / wrapper into your app.
Get the app to start making API calls, and your emails will be sent. |
| Scorecard for Building | Scorecard for Buying |
|
|
An experienced developer can, on average, get Postfix up and running from anywhere between 1 and 4 hours. At this stage, Postfix will deliver any properly constructed emails, but getting these emails out of your email framework may prove challenging. Monitoring of the delivery status and engagement data will also take more time to implement.
In addition, there are several features that may be missing:
- Templates that non-technical people can edit and deploy
- Bulk email processing and queueing
- Whitelisting of IP addresses
- Applying for preferred sender status at various ISPs
- Monitoring for blacklisting
Conclusion
When making the decision on building versus buying an email solution for your application, there is much more to the process than the work that goes into building a mail server. Features like email delivery monitoring and analytics for emails requires a lot more research and development time that could have gone into your own application.
Rather than spending a few hours on creating a decent solution, developers and designers should focus their energies and resources on building incredible applications.





