Friday Release Notes: Webhook Testing, Sending Domain Claiming, and More

Another week has ended, and that means that we have more Mandrill features and updates for all you wonderful people.

Testing webhooks

Webhooks are a great feature for integrating your site or application with Mandrill. You can listen for all kinds of events around your emails and act on them in totally custom ways. While this is really cool, it can be a pain to set up and test that webhooks are working, particularly if you're listening for bad or infrequent events like spam complaints and unsubscribes (and you don't want to generate actual spam complaints of unsubs for your account).

To make the setup process smoother, each webhook now has a "send test events" button. Click it, and we'll immediately send a batch of events (at least one of every event you're listening for) to your server so you can get a real example of the events we send and can iterate quickly on your integration. Pretty simple, but very cool. Here's some docs on how the button works, but seriously, it's a button. Click it.

User-Agent and geolocation data in webhooks

Two weeks ago, we expanded the open and click event webhooks to include the IP address and user-agent string of the email client or web browser that was doing the opening or clicking. We've expanded and contextualized that data by adding the geolocation info for the IP address and broken down the user agent data into nicely parsed and accessible values.

The geolocation data is available in the key "location", and the parsed user-agent info is available in the key "user_agent_parsed". Here's an example of the data you'll now receive:

 {"event": "open", 
  "location": {
      "city": "Oklahoma City",
      "country": "United States",
      "country_short": "US",
      "latitude": 35.46,
      "longitude": -97.51,
      "postal_code": "73101",
      "region": "Oklahoma",
      "timezone": "-05:00"},
  "user_agent_parsed": {
      "mobile": false,
      "os_company": "Apple Computer, Inc.",
      "os_company_url": "",
      "os_family": "OS X",
      "os_icon": "",
      "os_name": "OS X 10.6 Snow Leopard",
      "os_url": "",
      "type": "Email Client",
      "ua_company": "Postbox, Inc.",
      "ua_company_url": "",
      "ua_family": "Postbox",
      "ua_icon": "",
      "ua_name": "Postbox 1.1.3",
      "ua_url": "",
      "ua_version": "1.1.3"}}

Sender domain verification for greater security

Mandrill lets you set up SPF and DKIM for your sending domains, so you can sign your outgoing mail using that domain. By default, any Mandrill user will be able to send mail from that domain. This makes it easy to use a separate account in your staging environment. You may want to restrict which accounts can sign for your domains, though, so we've added the ability to verify ownership of a domain. To verify a domain, we'll send an email to an address on that domain. Once a domain is verified in an account, any other account that wants to sign with that domain will also need to go through the verification process. If they don't the email will still be delivered, but will be signed as a generic Mandrill email.

Improving the executable API docs

We're extremely proud of the work we've done making our API documentation interactive and executable. But, the example data that we've used was frequently too generic, so that you'd have to (sigh) actually edit the API request before you can get meaningful results. Well type no longer! We've changed the example request and response data for every single API call to be more accurate and immediately accessible. Check out the updated API docs.

Transparency in billing: account transaction logs

Mandrill has a pay-as-you-go utility pricing scheme, where we deduct funds from your account as you send. This makes for dramatically lower pricing, but can sometimes make it confusing exactly when and how you're being charged. To make this easier, we now log to your account every time we deduct credits from your balance and why. We'll also show you when and why we add credits to your account. This makes it easier to see what you're being billed or to later audit your usage.