Welcome! Log In Create A New Profile

Advanced

Ping Paulo ......Email.HTML -> fLoadText

Posted by AadG 
Ping Paulo ......Email.HTML -> fLoadText
October 11, 2022 04:11PM
Hi all,

I'm trying to get a logo into the Email.HTML function. When I click on the *.html file the browser opens and everything looks OK.
When I use the Email.HTML function the logo drops from the email. I respect all the paths, so that cannot be the problem.

Any ideas?

Best regards,

AadG



Edited 1 time(s). Last edit at 10/29/2022 01:10PM by AadG.
Argus
Re: Email.HTML -> fLoadText
October 11, 2022 05:32PM
if I remember correctly, images are NOT supported directly in html content. You either have to :
- use a url to point to an image hosted on a web server (those are the images that your email client always refuses to show by default)
- or transform your image in base64 text, then use a special image as base 64 tag in your html to incoporate it in it (it's a simple html syntax easy to google)
Re: Email.HTML -> fLoadText
October 13, 2022 11:43AM
Ok Argus thanks for your reply.
pao
Re: Email.HTML -> fLoadText
October 14, 2022 10:22AM
Did you try using the EmailImportHTML function?
[doc.windev.com]

Regards

Paulo Oliveira
Re: Email.HTML -> fLoadText
October 15, 2022 09:07AM
Hi Paulo,

I tried your suggestion, but can't get it to work, so I must be doing something wrong.
Do you have by any chance a working piece of code that I can integrate. How do you make your HTML-file with
an image included. The editor I tried was Word, but I don't think thats's the best option.

Best regards,

Aad



Edited 1 time(s). Last edit at 10/28/2022 03:40PM by AadG.
pao
Re: Email.HTML -> fLoadText
November 04, 2022 10:08PM
Sorry, I don't have any example of this.

Regards

Paulo Oliveira



Edited 1 time(s). Last edit at 11/04/2022 10:08PM by pao.
Re: Email.HTML -> fLoadText
November 05, 2022 04:22PM
Hi Aad,

here is some working code: (WINDEV25)

Definitions:
////////////////////////////////////
GLOBAL


pfad is string
res is string
glMailID is int
cnt is int

empf is string
popt is string

MyMessage is Email

MySession is emailSessionSMTP

myatt is emailAttach
MyHTMLText is string
mypics is string

///////////////////////////////////////////

IF ftyp = 1 THEN // html control

MyMessage.HTML = HTML1

END

IF ftyp = 2 THEN // plain TEXT
MyMessage.Message = HTMLToText(HTML1)
END


IF ftyp = 3 THEN // html file
prepareHTML()
EmailImportHTML(MyMessage,MyHTMLText,mypics)

END

PROCEDURE prepareHTML()

MyHTMLText = fLoadText(Inhalt)

mypics = fExtractPath(Inhalt, fDrive+fDirectory)

HTML2 = Inhalt

////////////////////////////////////////////

// Inhalt contains the path and file of the HTML File

// HTML2 is the HTML Control


regards, Heinz
Re: Email.HTML -> fLoadText
November 05, 2022 04:25PM
Thank you Heinz,

I'm going to try this out

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: