Problems when generating HTML content in the body of the E-mail

I’ve written a little function which does that :

1/ SAVEASHTML a Report which contains 2 logo → MYDOC.HTM

2/ I Use codeunit 400 to send the E-mail via SMTP

2.a I basically read the text file MYDOC.HTM and each line of the file is then passed to CU400.AppendBody ( FileRecord)

2.b I then add 2 attachments : mylogo1.bmp mylogo2.bmp

Result in OUTLOOK 2003 : I can see my HTML Body including the 2 logos

Result in GMAIL.COM, HOTMAIL.COM : I cannot see the 2 logo in the HTML body, I’ve got 2 red cross appearing instead of the logo

The other problems I’ve got is that if I put some blank lines in the report I’ve this:

&NBSP

which appears in the body

I hope someone out here has got a cure for this …

It’s gives some work to put images in html body directly. You will notice most automated html e-mails have picture linked to some website or something like that. Images embedded in html body are attached something like this cid:image001.png@01C87EB0.C7345A60 . This is a special attachment type understood by most e-mail readers. Using Navision smtp automation I dougth you can send e-mails like you want.

Well, I need to find a work around to crack this one then …

Hmmm, let’s assume I can convert my HTML file into a single .JPG file

Do you know if it’s possible to inline a .JPG file in the body of the E-mail using CU 400 ?

BTW, I cannot use MAPI, the customer has got a Linux based mail server …

I think you should have the same problem. I should use another component. I don’t know I have knowledge of .NET but you could create a COM object like this http://www.codeproject.com/KB/aspnet/inkrajesh.aspx