Welcome! Log In Create A New Profile

Advanced

Image in HTMLfile -> Outlook.

Posted by AadG 
Image in HTMLfile -> Outlook.
December 14, 2018 02:46PM
Hi all,

As of WD23 it is possible to include an image in a HTML-fle and send this file by email. Most of the emailclients do show the image, but
MS Outlook shows it's natural way of not cooperating. There is only a black square where the image should be. Right clicking the black square
doesn't give any info about the image. I'm using the RTFtoHTML function.

Does somebody know how to solve this ??


Best regards,

Aad
ISO
Re: Image in HTMLfile -> Outlook.
December 17, 2018 02:06PM
i use the following, where EDT_body is an HTML field containing the image(s)


bdy is string ="{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang2057{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}} {\*\generator Riched20 10.0.14393}\viewkind4\uc1 \pard\f0\fs17\par}"+ EDT_body

MyMessage..HTML = bdy

EmailSendMessage(nOutlookSessionID, MyMessage)
Re: Image in HTMLfile -> Outlook.
December 17, 2018 02:50PM
Hi ISO,

Thanks for you reply.

I'm still getting the empty square in the mail accompanied with your stringtext. This is the code I used.

Outlookbody is string = "{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang2057{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}} {\*\generator Riched20 10.0.14393}\viewkind4\uc1 \pard\f0\fs17\par}"
Email.HTML = Outlookbody + RTFToHTML(SCRTF.EDIT_RTFTEXT)

Any hints ??

Best regards,

Aad
ISO
Re: Image in HTMLfile -> Outlook.
December 17, 2018 03:13PM
Are you wanting to use RFT?

Maybe this helps:


//EDT_footer // this is an RFT field

//EDT_body // this is an RFT field with image


myItem is object OLE dynamic
myOlApp is object OLE dynamic
myOlApp= new object OLE "Outlook.Application"

myItem = myOlApp>>CreateItem(0)
myItem>>Subject = "Subject"
myItem>>Recipients>>"someone@hotmail.com"

myItem>>Display()
myItem>>HTMLBody = RTFToHTML(EDT_body) + CR + CR + RTFToHTML(EDT_footer )
Re: Image in HTMLfile -> Outlook.
December 18, 2018 11:43AM
Thanks for your example code. Going to give it a try.

Best regards,

Aad
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: