Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HTML in MAPI class
Message
 
À
30/05/2003 10:37:20
Humberto Ramirez
H. Ayuntamiento de Colima
Colima, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00794506
Message ID:
00794526
Vues:
11
For any email HTML formatted message in Outlook Express open Properties - Details - Message Source.
It gives you an understanding how such message should be formatted.

You will see something like
Content-Type: multipart/alternative;
  boundary="NextPart_048F8BC8A2197DE2036A"

This is multi-part message in MIME format.

--NextPart_048F8BC8A2197DE2036A
Content-Type: text/plain; chars
and then
--NextPart_048F8BC8A2197DE2036A
Content-Type: text/html; charset=iso-8859-1
Content-Type value is important.

For MAPI and Winsock you have to create all parts by yourself. CDO approach is more convenient:
#DEFINE cret  Chr(13)+Chr(10)
LOCAL cdoMsg
cdoMsg = CreateObject('CDO.Message')

WITH cdoMsg
	.Sender = 'info@myhost.com'    && replace with your address
	.To = 'myfriend@somewhere.com' && replace with valid recipient email

	.Subject = 'Message in HTML format sent using Microsoft CDO'

	.HTMLBody = '<h1>What could be simpler?</h1>' +;
		'<p>Sending emails with <Strong>Microsoft CDO</Strong> appears to be ' +;
		'the <Em>simplest</Em> way you have ever tested.</p>'

	WAIT WINDOW NOWAIT 'Sending message...'
	.Send
	WAIT CLEAR
ENDWITH
Just using HTMLBody property instead of TextBody creates HTML formatted email message automatically.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform