Skip to content

Instantly share code, notes, and snippets.

@forcethesales
Last active May 20, 2021 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forcethesales/59d4be6910ceb1fb6087aa351cc4f6f2 to your computer and use it in GitHub Desktop.
Save forcethesales/59d4be6910ceb1fb6087aa351cc4f6f2 to your computer and use it in GitHub Desktop.
Unsubscribe Link Email Templates
Classic Contact HTML Email Template
Dear {!Contact.FirstName} {!Contact.LastName}, </br>
<a href="https://InsertYourSiteDomainHere/Unsubscribe?recordId={!Contact.Id}&Email={!Contact.Email}">Click here to unsubscribe from all emails from our organization.</a>
</br>
Instructions: </br>
<li>Change ONLY this part of the HTML above:</li>
InsertYourSiteDomainHere</br>
to the Site Domain you saved earlier.</br>
<li>The word "Unsubscribe" is case sensitive!</li>
<li>Change "our organization" to the name of your organization.</li>
<li>Make sure you modify the text only version as well.</li>
<li>Delete the instructions here and add the rest of your email above the link.</li>
Notes:</br>
<li>This email template comes with the unmanaged package "Unsubscribe Link" </li>
<li>This link above launches the flow called Unsubscribe Link.
<li>The flow will have an error if an email address includes a special character like +. The package contains a visualforce email template that accommodates special characters.</li>
<messaging:emailTemplate subject="Template with Unsubscribe Link" recipientType="Contact" >
<!--Template by Jessie Rymph with unmanaged package Unsubscribe Link from Salesforce Labs.-->
<!--A visualforce template allows you to account for email addresses that include special characters like plus signs.-->
<messaging:htmlEmailBody >
<html>
<body>
<p> Insert content of email here.</p>
<p> Insert your site domain name in the URL below. </p>
<p> Change "our organization" to the name of your organization. </p>
<a href="https://InsertYourSiteDomainNameHere/Unsubscribe?recordId={!recipient.Id}&Email={!URLENCODE(recipient.Email)}">Click here to unsubscribe from all emails from our organization.</a>
<!-- For example my line 9 would look like <a href="https://sdo-demo-main-164dcce81f8.secure.force.com/Unsubscribe?recordId={!recipient.Id}&Email={!URLENCODE(recipient.Email)}">Click here to unsubscribe from all emails from our organization.</a> -->
<!--Make sure that you only change the text for "InsertYourSiteDomainNameHere". The world "Unsubscribe" is case sensitive! Must start with uppercase U!-->
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Dear {!Lead.FirstName} {!Lead.LastName}, </br>
<a href="https://InsertYourSiteDomainHere/Unsubscribe?recordId={!Lead.Id}&Email={!Lead.Email}">Click here to unsubscribe from all emails from our organization.</a>
</br>
Instructions: </br>
<li>Change ONLY this part of the HTML above:</li>
InsertYourSiteDomainHere</br>
to the Site Domain you saved earlier.</br>
<li>The word "Unsubscribe" is case sensitive!</li>
<li>Change "our organization" to the name of your organization.</li>
<li>Make sure you modify the text only version as well.</li>
<li>Delete the instructions here and add the rest of your email above the link.</li>
Notes:</br>
<li>This email template comes with the unmanaged package "Unsubscribe Link" </li>
<li>This link above launches the flow called Unsubscribe Link.
<li>The flow will have an error if an email address includes a special character like +. The package contains a visualforce email template that accommodates special characters.</li>
<messaging:emailTemplate subject="Template with Unsubscribe Link" recipientType="Lead" >
<!--Template by Jessie Rymph with unmanaged package Unsubscribe Link from Salesforce Labs.-->
<!--A visualforce template allows you to account for email addresses that include special characters like plus signs.-->
<messaging:htmlEmailBody >
<html>
<body>
<p> Insert content of email here.</p>
<p> Insert your site domain name in the URL below. </p>
<p> Change "our organization" to the name of your organization. </p>
<a href="https://InsertYourSiteDomainNameHere/Unsubscribe?recordId={!recipient.Id}&Email={!URLENCODE(recipient.Email)}">Click here to unsubscribe from all emails from our organization.</a>
<!-- For example my line 9 would look like <a href="https://sdo-demo-main-164dcce81f8.secure.force.com/Unsubscribe?recordId={!recipient.Id}&Email={!URLENCODE(recipient.Email)}">Click here to unsubscribe from all emails from our organization.</a> -->
<!--Make sure that you only change the text for "InsertYourSiteDomainNameHere". The world "Unsubscribe" is case sensitive! Must start with uppercase U!-->
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment