Jump to content

ASP CDOSYS Problem


kwilliams

Recommended Posts

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

<%Response.Buffer = trueSet objSendMail = Server.CreateObject("CDO.Message") With objSendMail  .To = "you@mysite.com"  .From = "me@mysite.com"  .Subject = "Hello World!"  .HTMLBody = "<font face='arial' size='2'>Hello everyone.</font>"  .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 WithSet 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 14Besides ".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").Value = cdoHigh.Fields("urn:schemas:httpmail:importance").Value = 2.Fields.Item("urn:schemas:httpmail:importance").Value = 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:importance") = 3.Configuration.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") = 3If anyone can let me know how I can properly set the importance of the email to high, that would be great. Thanks.

Link to comment
Share on other sites

I found this:

	With objSendMail.Fields  		' for Outlook: 		.Item(cdoImportance) = cdoHigh  		.Item(cdoPriority) = cdoPriorityUrgent   		' for Outlook Express: 		.Item("urn:schemas:mailheader:X-Priority") = 1  		.Update 	End With

All of these properties apply to CDO.Message.Fields.What do you mean you don't have success? Does it give an error message or just not set the priority?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...