`<div class="row" style="display: flex;">
<div style="flex: 33.33%;
padding: 5px;" class="column">
<img src="#APP_FILES#icons/hololo.png" alt="Snow" style="width:50%">
</div>
<div style="flex: 33.33%;
padding: 5px;" class="column">
<img src="https://i.hizliresim.com/mxyxumi.png" alt="Forest" style="width:50%">
</div>
</div>
this is my email template body, i want to add image from app but i couldn’t make it,
anyone can help?
i have a send email process and i want to send the mail via email template, in the code i tried like #APP_FILES#icons/hololo.png but i couldnot make it. i want people to see everything in my email template even when they don’t have internet, how can i do that
2
Answers
The substitution "#APP_FILES#" only exists in the context of an apex session. It is parsed at runtime by the APEX engine. In an html file or email outside of APEX, it doesn’t mean anything.
When someone opens an email in his email client, APEX is not in the picture. So if an image is referenced in the email body, that image needs to be available to the email client for it to be rendered – typically within the intranet (in that case the user will be able to see the picture in the email when he is logged on to the intranet) or – if needed – on the public internet. Either way, a fully qualified url is needed.
Change the URL to reference a Content-ID:
and then read the file
#APP_FILES#icons/hololo.png
into a BLOB and add it to your e-mail as an attachment (SeeAPEX_MAIL.ADD_ATTACHMENT
) with the namehololo.png
.