467,858 Members | 1,670 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,858 developers. It's quick & easy.

Setting Imoprtance level on E-mails using CDO in IIS 6.0

Good Morning,

My question refers to setting importance levels for Emails sent using IIs 6.0. Initially the webserver that was sending E-mails used IIS 5.x, but since the upgrade I can not use the configuration for E-mail Importance. I keep getting the following error:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Importance'
I've searched and searched but I can't seem to find any help on line.

Does anyone have any ideas on how to alleviate this issue?

The code reads;

ObjSendmail.Importance = request.Querystring("SelImportance")

As you can see the information is collected from another form, but I don't quite know how to fix it.

Thanks,

Mal Green
Nov 20 '07 #1
  • viewed: 1250
Share:
2 Replies
jhardman
Expert 2GB
Let me ask you a very straight-forward question. Is it worth it to try to fix this? email importance is something that was built in to email fifteen years ago, and no one has used it since. Are you actually using it, or do you want to just delete that line?

Jared
Nov 22 '07 #2
JamieHowarth0
Expert 512MB
Hi Mal,

Having checked MSDN's documentation the Importance value of a mail object using CDO can be one of three values - 0 (low importance), 1 (normal) and 2 (high).

You are setting the importance value using Request.Querystring("SelImportance") - however most (if not all, in my experience) parameters in a GET request to server are parsed as string values - so chances are SelImportance will equal "Low", "Normal" or "High" (or "0", "1" or "2").

If the data is qualititative (i.e. uses words like Low etc.) to describe the message priority then you need to use a Select Case like so:
Expand|Select|Wrap|Line Numbers
  1. Select Case Request.QueryString("SelImportance")
  2.     Case "Low"
  3.         ObjSendMail.Importance = 0
  4.     Case "High"
  5.         ObjSendMail.Importance = 2
  6.     Case Else
  7.         ObjSendMail.Importance = 1
  8. End Select
  9.  
Or, if your data is quantitative (numbers, but the server recognises it as a string value) then simply use:
Expand|Select|Wrap|Line Numbers
  1. ObjSendMail.Importance = CInt(Request.QueryString("SelImportance"))
Addenum: the other thing I have noticed - you say that you have just migrated from IIS 5.x to 6.0? What object are you using for the SendMail command? Documentation shows that CDONTS is no longer supported as of IIS6 and has been superceded by CDOSYS which would involve using this line of code:
Expand|Select|Wrap|Line Numbers
  1. Set ObjSendMail = Server.CreateObject("CDOSYS.Message")
Hope this helps.

medicineworker
Nov 23 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by one man army | last post: by
reply views Thread by kidders | last post: by
1 post views Thread by Jerad Rose | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.