FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Sending emails and html
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Sending emails and html
Posted: Fri Feb 27, 2009 10:49 AM
Hello,

I want to send emails using html to be able to add a heading to my messages.

To do this, I use the function : oMail:HtmlBody.

But there is also the function : oMail:Body.

In fact, the first function is doing the job, except for the layout of the text I want to add. All CRLF of CHR(13) are denied which results into the all the text being grouped into one block.

What can I do to solve this problem ?

My code for instance looks like this :
Code (fw): Select all Collapse
LOCAL EmText := "" // Variable to put my text in.
.....
oMail:HTMLBody := "<html><body><p><img border=" + CHR(34) + "0" + CHR(34) + "src=" + CHR(34) + "http://www.ma-consult.be/image.jpg" + CHR(34) + " width=" + CHR(34) + "305" + CHR(34) + " height=" + CHR(34) + "67" + CHR(34) + "></p><p>" + ALLTRIM(FmText) + "</p></body></html>"

The image-file is shown in my email, the text (FmText) follows immediately, but unformated (all text behind each other).

I hope someone can help me, maybe by adding some hmtl-code ?

Thanks a lot in advance.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Sending emails and html
Posted: Fri Feb 27, 2009 11:57 AM

You have to use <p> or <br> intead of CRLF.

EMG

Continue the discussion