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:
-
Select Case Request.QueryString("SelImportance")
-
Case "Low"
-
ObjSendMail.Importance = 0
-
Case "High"
-
ObjSendMail.Importance = 2
-
Case Else
-
ObjSendMail.Importance = 1
-
End Select
-
Or, if your data is quantitative (numbers, but the server recognises it as a string value) then simply use:
- 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:
- Set ObjSendMail = Server.CreateObject("CDOSYS.Message")
Hope this helps.
medicineworker