Mandrill to Maildocker: a guide to shift platforms

Como migrar do Mandrill para o Maildocker

A very popular transactional email provider decided to change the terms of the contract with their customers and eliminated the free plan. After the announcement, many developers began looking for an alternative solution, but migrating data from one platform into another one can become a real headache. To help you performing the migration in an easy way, we have prepared a guide highlighting some of the main differences between sending transactional emails via Mandrill and Maildocker platform.

Maildocker Term Mandrill Term
merge_vars merge_vars
tags tags
custom_attributes metadata
multiple user subaccount
suppressions rejections
X-SMTPAPI X-MC-*

Maildocker Documentation:

We also prepared a guide containing our documentation if you want to check it before proceeding. It would be great diving into the details before starting your shots and make API calls, isn’t it?

How to send an email using a Docklet associated with a template

To send one or more emails, a request should be made to the endpoint using POST with a valid JSON. The unique attribute necessary is theto, a list with one or more containers. Each list item is a dictionary containing the following fields:

  • email*
  • name
  • merge_var
  • attachment

*mandatory

It’s mandatory to inform the recipient’s email. The other fields are optional. The sender’s Data, Name, Email and Subject will be rescued from the saved template and used to format the email that will be sent.

Check complete information here >>

Maildocker Template:

Check the code below:


<html>


Customization test
Name: {{contact.name}}
Email: {{contact.email}}
Birthdate: {{birthdate}}
Gender:{{gender}}
<html>

Check complete information here>>

RESTful Request

Run a request

Endpoint: http://seu_usuário.ecentry.io/api/maildocker/v1/mail/
Method: post Authorization: Basic Content-Type: application/json


{
    "to": [{
        "name": "Full Name",
        "email": "[email protected]",
        "merge_vars": {"birthdate":"02/08/1984", "gender":"male"}
    }]
}

Here is the same example sent by Curl


"curl -­?v -­?-­?user 933ff2214029fffe19c:8107ff48ff6bc4fb19
http://yourdomain.ecentry.io/api/maildocker/v1/mail/
-­?H "Content-­?Type: application/json"
-­?d {"to": [{
                "name":"Full Name",
                "email":"[email protected]",
                "merge_vars": {"birthdate":"02/08/1984", "gender":"male"}
           }]
    }

The Basic Authorization must be used, using the API KEY and the API SECRET as data for authentication.

API Key

API Key is the Docklet login, used to identify where the email was sent from. It is also used to authenticate your application for many purposes.

API Secret

API Secret is the password. Result The result of the post, if the JSON is correctly formatted and the authorization was given, is a JSON containing a list of each one of the emails sent and a unique event identifier. Check complete information here>>

Events Recovery

Maildocker uses the concept of events and event chain. Each email sent, opening, click, unsubscribe or bounce is treated as an event, and they are all related to one chain of events that starts with the sending. Check complete information here>>

Adding attachments In order to send an email with a file attached add the tag attachments to your JSON, like the example below:

Check complete information here>>

API Libraries

With our libraries you will be able to do a fast integration between Maildocker and your project with a variety of languages and frameworks. We keep the following official libraries for you to send your transactional emails:

maildocker-nodejs - Official NodeJS library maildocker-php - Official PHP library maildocker-python - Official Python library maildocker-ruby - Official Ruby library

Code Examples

Visit the links below to access more information:

Haven’t got created your free account yet? Access now http://maildocker.com/

Our technical team offers all the support to help you import your contact base for our platform.

Emails for developers