Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 1st, 2003, 04:23 AM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML messages are sent as plain text

I'm using the following VBS function on an Intranet server to send messages. The Body parameter contains an HTML string. However, the message arrives as plain text, with the HTML source visible:

Sub Dir_SendMail(Sender, Recipient, Subject, Body)
    Dim objMail
    Set objMail = CreateObject("CDONTS.NewMail")
    objMail.BodyFormat = 0 ' cdoBodyFormatHTML
    objMail.From = Sender
    objMail.To = Recipient
    objMail.Subject = Subject
    objMail.Body = Body
    objMail.Send
    Set objMail = Nothing
End Sub

I don't have cdovbs.inc and so found the value for cdoBodyFormatHTML by creating a VBA project, including CDONTS.DLL in the references and then typing ? cdoBodyFormatHTML in the Immediate window to produce the literal value 0.

What am I missing?

TIA,

Geoff





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show plain format from html hdpark BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 14 November 26th, 2008 05:31 PM
Grouping plain text into paragraphs igraham XSLT 4 July 16th, 2007 01:10 PM
Changing between bold and plain text in a text box funkybuddha Access 2 January 3rd, 2006 10:15 AM
plain vs HTML format juergreh Beginning PHP 2 April 19th, 2005 08:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.