Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 December 7th, 2006, 11:55 AM
Banned
Points: 1,561, Level: 16
Points: 1,561, Level: 16 Points: 1,561, Level: 16 Points: 1,561, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2005
Location: , , .
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP CDOSYS Problem

I've been using the following ASP/VB email code for some time with no problems:

Code:
<%
Response.Buffer = true
Set objSendMail = Server.CreateObject("CDO.Message")
 With objSendMail
  .To = "you@mysite.com"
  .From = "me@mysite.com"
  .Subject = "Hello World!"
  .HTMLBody = "Hello everyone."
  .Importance = 2 'cdoHigh
   .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "MAILSERVERNAME"
  .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
  .Configuration.Fields.Update
  .Send
 End With
Set objSendMail = Nothing
%>
But now I'm receiving this error message concerning the "Importance":

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Importance'

/HelpDesk/bgscripts/testemail.asp, line 14

Besides ".Importance = 2", I've tried the following other options I've seen from several sites without success:
.Fields.Item(cdoImportance) = 2
.Configuration.Fields.Item("urn:schemas:mailheader :X-Priority") = 1
.Fields.Item("urn:schemas:httpmail:importance").Va lue = cdoHigh
.Fields("urn:schemas:httpmail:importance").Value = 2
.Fields.Item("urn:schemas:httpmail:importance").Va lue = 2 'cdoHigh
.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") = "High"
.Configuration.Fields.Item("urn:schemas:mailheader :X-Priority") = 3
.Configuration.Fields.Item("urn:schemas:httpmail:i mportance") = 3
.Configuration.Fields.Item("urn:schemas:mailheader :X-MSMail-Priority") = 3

If anyone can let me know how I can properly set the importance of the email to high, that would be great. Thanks.

KWilliams




Similar Threads
Thread Thread Starter Forum Replies Last Post
problem using CDOSYS shankhan Classic ASP Components 1 January 9th, 2009 11:22 AM
Sending Mail Using CDOSYS in ASP artarasan Classic ASP Basics 1 May 12th, 2008 06:11 PM
ASP / CDOSYS - Performance issue worldofrugs ASP.NET 2.0 Professional 0 May 1st, 2008 10:40 AM
Form in ASP using CDOSYS webbman75 Classic ASP Basics 2 March 28th, 2007 08:36 PM





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