user2430670
user2430670

Reputation: 11

Set callback per email in Mandrill

Is it possible to set callback (webhook) per email being sent? I have two different types of webhooks needs to be triggered depending on the which one of my server email is being sent.

I can not see any parameters in /messages/send.json . All I see is the webhook setting page where I can hard-code my webhooks.

Any ideas?

Upvotes: 0

Views: 1512

Answers (1)

Kaitlin
Kaitlin

Reputation: 6235

You can do this using Mandrill's Rules Engine. You'll first want to set up the webhook URLs on the Webhooks page in your account. Don't select any events to trigger, but just save the webhook (and give it a description if you want).

Then, create a Rule for each type of event you want (send, open, click, etc), and the criteria to apply the rule (for example, you can set it to occur when a message is sent, and the sender address matches a certain pattern). For the action, select the option to send the webhook and choose the one you want to use. In the Example Rules, there's a section for "Create API key, sender, or domain-specific webhooks" that will show how you can do this.

Upvotes: 3

Related Questions