Responsive Email integration

Copernica, the company that develops MailerQ, also operates an online service to create responsive emails based on JSON input: responsiveemail.com. The algorithm to transform JSON into responsive emails can be used by installing the Mimify application. This application takes JSON (instead of MIME), and will convert them into valid email messages. Please see the documentation of Mimify for more information.

{
    "envelope": "sender@example.com",
    "recipient": "receiver@example.com",
    "mime": {
        "from": {
            "name": "John Doe",
            "address": "sender@example.com",
        },
        "subject": "Example email",
        "text": "Text version",
        "background": {
            "color": "white"
        },
        "content": {
            "blocks": [{
                "type": "html",
                "content": "<p>Example content</p>"
            }, {
                "type": "button",
                "label": "click here"
            }]
        }
    }
}

Mimify reads JSON objects from the RabbitMQ "outbox" queue. These JSON objects hold properties like "envelope", "recipient" and "mime", where the "mime" property is normally set to a string holding the full message source in MIME format. However, you can also assign a nested JSON object to this "mime" property (see above example). This nested object is processed by Mimify and transformed into a MIME message.

There are many nested properties that are supported by the algorithm, which are all documented on the ResponsiveEmail.com website. Note that the properties that are described as top-level properties on the responsiveemail.com website, are (of course) nested properties inside the "mime" property of the object that is processed by Mimify.

Migration to Mimify

Previous versions of MailerQ had this functionality embedded into it. You could pass a JSON object to the mime property of a message, and it would internally convert it to MIME before sending the message. This has been removed to keep the MailerQ application lean, and to off-load this operation (which can be very network-dependent) to a separate application, to prevent it from impacting the performance of the rest of the application.

In order to keep using this feature, you will need to add the Mimify application to your stack. This essentially contains all the logic that has been stripped from MailerQ in a separate application, that can consume from your RabbitMQ outbox, and publish them back so MailerQ can send them. Please follow the installation instructions to get started.

Integrating Mimify into your stack, can vary across different setups. The most important piece of the setup however, is that Mimify reads messages from a queue where your messages are coming in, and publishes them to the queue where MailerQ consumes from. Note that you can not pass regular MIME to Mimify. A simple setup would look something like the following:

You can copy some of your download options to Mimify, to control settings like user-agents, proxies, whitelists, and blacklists. Please check the download options for Mimify for more details.

Additionally, you can also get some metrics from the Mimify application. These can be configured using the configuration file. Please check the webserver options for Mimify to set this up. This page can be used to debug any bottlenecks/issues in Mimify, which is something that previously was not possible with MailerQ.