Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement