Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmer
Message
De
24/02/2002 02:13:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Programmer
Divers
Thread ID:
00624222
Message ID:
00624222
Vues:
38
Hi, I would like some help in outputting an HTML body to Outlook. I have the following code:

cMsgFile = "c:\backup\wel_let.txt"
cHtmlMsg1 = ""
nHandle = FOPEN(cMsgFile)
nSize=FSEEK(nHandle,0,2)
FSEEK(nHandle,0,0)
cHtmlMsg1 = FREAD(nHandle,nSize)
FCLOSE(nHandle)

oApp = createobject("outlook.application")
oMail = oApp.Createitem(0)
oMail.subject = "Welcome Letter"
oMail.to = "abc9@hotmail.com"
oMail.htmlbody = cHtmlMsg1

oMail.send
oApp =.null.

This ouputs a blank body in my Outlook. If I were to replace:

oMail.htmlbody = cHtmlMsg1

with

oMail.body = cHtmlMsg1

I get all the HTML code instead of the format. What do I do so that I can get an HTML format in the body of my email.

Thanks,

Louis

PS When sending an email from VFP I get the following message in Outlook:

"A program is trying to automatically send e-mail on your behalf. Do you want to allow this?"

Is there a way to disable this feature?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform