Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Text and HTML Email combinded
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00832585
Message ID:
00832717
Vues:
18
>I need to send email to customers that would conist of text base email content for those customers that can not read HTML email and HTML email for those who can.
>
>I am using WWIpstuff but it does not seem to support this.

See thread184-649427 on Tek-Tips.com for some code examples illustrating how to use MIME encoding for multiple email message parts. The example happens to be for including MIME attachments, but HTML messages are done in the same way, and are included as part of the example.

You probably can use the wwIPStuff still, and just add to the headers it includes.

essentially, each part of the email (MIME=Multi-Part Internet Mail extensions) gets it's own mini-header, telling what that part contains. Just include three parts: One with no header (for non-MIME email programs), one with MIME Content-type: text/plain, and one Content-type: text/html

ie:
cMsgBody = lcPlainTextMsgBody+crlf+'--'+lcBoundary+crlf;
+'Content-type: text/html; charset="us-ascii'+crlf;
+crlf;
+lcPlainTextMsgBody;
+crlf+'--'+lcBoundary+crlf;
+'Content-type: text/plain; charset=us-ascii'+crlf;
+crlf;
+lcHtmlMsgBody
(I just whacked that together without testing, from memory, so I may not have enough blank lines between message 'part's)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform