Based in question HTML Email Template URL Encode

That it exposes the problem like:

<a href="http://example.com/?region={!URLENCODE(Contact.Region__c)}">Click me</a>

I am trying to encode a parameter in base64 string in a email template

<a href="http://example.com/?region={!BASE64ENCODE(Contact.Region__c)}">Click me</a>

I try to figure out how to do this with the documentation of page variable functions, but it seems that BASE64ENCODE or similar is not defined.

Since it is a email template, I don't have access to javascript to encode a text in base64 for a string template, and it is in a user email template defined, without APEX, so how properly encode in base64 a string in a email template?

  • What kind of template are you trying to use? HTML? Plain Text? Visualforce?
    – sfdcfox
    Apr 11, 2022 at 16:21
  • It is a HTML template loaded in Salesforce (after payment page hook where the page variable functions are available) with a button. No Visualforce.
    – shakaran
    Apr 12, 2022 at 17:46


You must log in to answer this question.

Browse other questions tagged .