Currently i am setting up some emails with a mailto: with subject line and body. Unfortunately the href that has mailto: in its property always gets wrapped that salesforce can measure the clicks that have been done on this link.

The problem is that this breaks the functionality on mailto:

Here is my Script and the corresponding html :

var @mailto, @mailtobase, @subjectline, @body
var @name, @uuid, @email, @alias
set @name = [name]
set @uuid = [uuid]
set @email = [email]
set @alias = "Unsubscribe"
set @mailtobase = 'mailto:[email protected]?'
set @subjectline = Concat("subject=Cancellation of newsletter subscription, customer ",@uuid)
set @body = Concat("&body=My Data:,<br><br>Company:", @name,"<br>Customer number: ",@uuid,"<br>E-Mail: ",@email)
set @mailto = Concat(@mailtobase,@subjectline,@body)

Would you like to <a alias="%%=v(@alias)=%%" conversion="false" data-linkto="mailto:" href="%%=v(@mailto)=%%" style="color:#E3051B;text-decoration:none;font-weight : bold; " title="">unsubscribe</a>?

The output is of the href is a link that got wrapped to the http://click.ourdomain.com/?qs=XXXXXXXXXXXXXXXXXXXXXXXX


  • How can i disable this link from being wrapped?
  • How can i disable this link from being changed but that it will still be tracked?

I do not want to disable the other tracking in the email.

1 Answer 1


A couple ways to do this are:

Obsfucate the link:

var @unsubLink
set @unsubLink = Base64Encode('<a href="http://domain.com/unsubscribe">unsubscribe</a>')


This example is from @EliotHarper 's answer here

Another way is to utilize a CONCAT inside the href:

<a href="%%=CONCAT("mailto:", @mailto)=%%"> which will cause the processer to view it as an invalid link.

Previously just storing the link as an AMPScript var would cause the link to skip getting tracked, but it appears this is not working in your case.

I would also verify that the final mailto var you have is correctly outputting a valid mailto link as this could be causing the issue as well.

  • <a href="%%=CONCAT("mailto:", @mailto)=%%"> creates an output like http://click.ourdomain.com/%%=concat( when you click on that "unsubscribe". Gonna Test base64 en and decoding now Commented Oct 4, 2018 at 13:17
  • Did you remove the duplicate mailto: that would be in your mail to var? Commented Oct 4, 2018 at 13:29
  • Yes i removed it. Commented Oct 4, 2018 at 13:33
  • Base64 was the solution. Atleast it worked ;) now i am stuck with the problem how it is possible to insert a linebreak in the email body inside mailto ;) Commented Oct 4, 2018 at 14:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .