To create a unique URL for our customers in an email (to review our services on another website) I will need to use the BASE64 version of the person's email address and append that to the URL as a query string.
For example https://www.trustpilot.com/evaluate/www.kaplaninternational.com?b=%%emailaddress%%
so using my email address ([email protected]) that would be this: https://www.trustpilot.com/evaluate/www.kaplaninternational.com?b=c2JpODVnQGdtYWlsLmNvbQ==
Of course I can't use online Base64 calculators since this email would go out to a lot of people in an automated fashion.
So the question is... Is it possible to build up an AMPscript that would do this conversion?
I looked around and haven't found any clue how the conversion is happening. If we would know that (or you might already do), we just need to replicate the calculation steps with AMPscript, I reckon.
What do you think?
edit: actually I found how roughly the calculation is happening:
Base64 encoding takes three bytes, each consisting of eight bits, and represents them as four printable characters in the ASCII standard. It does that in essentially two steps.
Rest is here: http://email.about.com/cs/standards/a/base64_encoding.htm