Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending Text and HTML Email combinded
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00832585
Message ID:
00832717
Views:
17
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform