From the API:
What happens when the [unsubscribe] link is clicked?
If a recipient clicks the generated link, the message status is changed to Unsubscribed and > the recipient's address is added to the Rejection Blacklist in your
Mandrill account. The redirect URL will be appended to include two
querystring parameters that can be used for processing the unsubscribe
in your own system or database:
md_id - the _id, as provided in the API call and webhooks of the
specific message where the unsubscribe link was clicked
md_email - a URL-encoded version of the recipient's email address
So you don't have to worry about generating an unsubscribe url for every user. Just put a generic url and mandrill automatically will append to you the email of that user in the md_email variable.
The documentation suggest that you do this then:
<a href="*|UNSUB:http://mywebsite.com/unsub|*">Click here to unsubscribe.</a>
And mandrill will append the correct user email and id:
http://mywebsite.com/[email protected]&m_id=23321
UNSUBtag. What stops you from doing this directly:<a href="*|COMMUNITYURL|*/site/unsuscribe/user_id/*|USERID|*/hash/*|HASH|*/type/all|*"> Unsubscribe </a>? - Tomásheaderssection in the expected json, but that's a general section, and I need a personalized unsubscribe link for every mail. So I would need another section for personalized headers, like for the merge vars you can use theglobal_merge_varssection for merge tags that are the same in all emails and themerge_varssection for merge tags that are dependent of the particular mail being sent. - AntonioHS