0

I’m working with an org that has acquired multiple businesses underneath it; they all have different logos.

I want to make a lightning dynamic letterhead that displayed their email Footer/Header based on their location.

Since you can’t call apex from the letterheads but you can use merge fields, I thought I would :

  • convert images to base64
  • store on a custom field in the user object
  • Then insert that custom field into my letterheads as a merge field.

I tried a rich text field but that doesn’t accept HTML. SO now I’m using a long txt area field and I’m getting the correct base64 image stored to the user object, but when I send the email it just displays it as plain text and doesn’t render the image.

MY Base 64 Image is saved as:

<!DOCTYPE html>
<html><body>
<img src="data:image/png;base64, RANDOMSTRINGOFBASE64” />
</body></html>

I tried giving a doctype but that didn’t help either.

Is there a way to solve this business need of displaying dynamic headers/footers in an email depending on locations?

Is there a way to Parse the HTML from a field to use in the letterhead?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.