Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending HTML email via Microsoft Outlook
Message
 
À
27/04/2001 16:11:31
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00495872
Message ID:
00502149
Vues:
31
It should work. We have implemented this is some of our systems. We experienced the exact same problem at the start. Here is a copy of the response that I received from Microsoft.

--------
The way you see is by design and when you call Display before Send,
Outlook will call HTMLEditor to interpreter the HTML body and convert it
into RTF then send it out. The Yahoo and Hotmail mail servers are able
to understand RTF and display it correctly. On the other hands, if you
call Send directly, no HTMLEditor gets involved and Yahoo and Hotmail
mail servers don't how to handle such stream and as the results, they
will display it as plain text...

Workaround:
Call Display then call Send!

Sample:

Private Sub Command1_Click()
Dim OL As New Outlook.Application
Dim MI As MailItem
Set MI = OL.CreateItem(olMailItem)
With MI
.To = "rtrabin@upstart.com" ' TODO:
'.Cc = "larryzdu@hotmail.com" ' TODO:
.Subject = "Send html formatted mail - with display"
.HTMLBody = "HTML message"
.Display
.Send
End With
Unload Me
End Sub
------

FYI - In our office we are using Outlook 2000 and MS Exchange Server 5.5.

If you discover any interesting tricks please let me know. What are you using to edit the HTML message? We are currently using MS Word, but would like to include an HTML editor in our App. Have you ever seen an Active-X HTML editor?

I hope this helps. If it still doesn't work, let me know and I will send you some code that works in our office.

>Well, I just tried that. No cigar. I saw the Outlook message screen flash on the screen but when I checked the recipient's mail ... HTML did not show up.
>Thanks for trying anyway.
>
>
>
>>Don,
>>
>>To send HTML through Outlook you must call .Dispaly( ) before .Send( ).
>>
>>>Our company is beginning to explore sending email via Microsoft Outlook through Visual Foxpro 6.0. It works just fine except for 1 vital thing. The email we send in HTML format ends up being displayed in text only format. It works fine with email we send within our own company but external mail is received as text only. This happens at every site we have tested so far so we suspect it is a problem at our end. Anyone have an idea of what might be wrong ?
Shane Murdoch
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform