web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How do I embed images in a html mail template (Ax2009)

(0) ShareShare
ReportReport
Posted on by

Hi

I have been trying to add an image to a html template. If I add an image using the image button in the editor, the following html is sent to the receiver:

<html><HEAD></HEAD>
<BODY class=Axapta MarginWidth="0" MarginHeight="0" WebletName="WebLet101723727" Type="WebPageWeblet"><SPAN class=Axapta WebletName="WebLet101742916" TYPE="SysEmailEditorImageWebLet" FilenameOpen="\\servername\Temp\00000623_031.jpg" atomicSelection="true"><IMG border=0 src="cid:1"></SPAN></BODY></html>

I guess images will never be embedded, but if I point to a URL instead I get a similar html code in the message and the image is shown in the email as a link with the text "[Unknown file : ]"

Do I have to create the html code on my own? Or how should I interpret this strange result?

/Jonas

*This post is locked for comments

I have the same question (0)
  • Mykola Galak Profile Picture
    on at

    Adding image in the template editor is enough to make it work. Please make sure that image file you are trying to embed is located in folder specified in Administration->Setup->E-mail parameters->Allow embeded data and attached files from.

  • Community Member Profile Picture
    on at

    How is this file supposed to be embedded in the html mail? The html I pasted in my query is the actual html that is sent to the receiver. Even if I send this to myself (I have access to this folder, and the folder has been setup as you suggested) I still do not see the image.

    Is Outlook really supposed to be able to interpret this html code?

  • Community Member Profile Picture
    on at

    Well, I looked into this a bit more. It seems like we are using our own code, and it has not been written properly (after conversion from Ax3). So I guess I will have to do some coding now to make our own code embed the images.

    However, using the default sendmail method still gave me some headaches. It seems like the method isFromAttachmentsFolder is not working properly. If the allowed attachment path looks like this: \\servername\folder, the code does not work, since the line

       attachmentsFolder = Global::strReplace(attachmentsFolder,'\\','/');

    replaces "\\" with "//" for some strange reason. After that conversion, the allowed path does not match the actual file path and the image is never embedded.

    /jonas

  • Edvandro Santos Profile Picture
    55 on at

    Hi Jonas, use your attachments folder path as \server\path\ and it will work.

  • Suggested answer
    Edvandro Santos Profile Picture
    55 on at

    Hi Jonas, use your attachments folder path as \server\path\ and it will work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans