Templates update, inbound API calls, and SMTP logging

Last week, we conducted some planned maintenance to move some data around and generally make things faster and more reliable for our users. While we were at it, we also rolled out a small update for templates, added some API calls related to Mandrill's inbound email processing, and added API logging for messages transmitted via SMTP.

Templates: New Template Slugs

Previously, templates were tracked based on their name, and template names were required to be unique. However, template names could be changed, and if a template name was changed in the web interface, it would require a change to any code that used that template so that the updated name was properly reflected. We've added a template slug, which is a unique, unchangeable identifier for a template. It's based on the original name given to the template, but won't change even if the template name changes.

To ensure backwards-compatibility, you can use either the template name or the template slug to specify a template (for the messages/send-template API call, or in custom SMTP headers). We recommend using the template slug since it's guaranteed to be unique and unchangeable to avoid changes to code if the template name is changed.

Templates that were existing as of the time of the planned maintenance have a template slug identical to the name of the template at that time (so your code will continue to work as expected, and another template with the same slug can't be created). Templates-related calls now return the template slug in addition to the template name.

Inbound API Calls

We also added inbound API calls to retrieve information about inbound domains and routes that have been configured for your account. You can also use the inbound/send-raw API call to send a message for one of your inbound domains and have it routed to the inbound webhook URL. The API response will provide information about the route that was matched and the webhook URL where the message will be POSTed.

SMTP Logging

You can view the last 100 failed and last 100 successful API calls for your account in the API Logs page in your account. Now all messages submitted via SMTP are also logged in the API logs as messages/send-raw API calls. This allows you to see recent failed and successful SMTP transmissions for your account and to gain more insight into SMTP messages for troubleshooting or tracking purposes.