Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Priority in email

Status
Not open for further replies.

DenverMarc

Technical User
Apr 27, 2005
33
US
Hi everyone,

I have an asp page that generates an automatic email. Is it possible to tag the email as "high priority"? Everyone recieving the email is using MS Outlook. Here's the code:
Code:
<%
   Set Mail = Server.CreateObject("CDO.Message")
   Mail.From = request("SupportUser")
   Mail.To = request("assigned") 
   Mail.CC = RSInfo("SupportManagerEmail")
   Mail.Subject = "DM2 Support - Ticket Reassigned" 
   Msg = "Ticket # " & RSInfo("SupportID") & " concerning Product Mag Code " & RSInfo("MagCode") & Chr(10)
   Msg = Msg & "has been reassigned to " & RSInfo("SupportAssigned") & ". You do not need to work it." & Chr(10)
   Mail.TextBody = Msg
   Mail.Send
   Set Mail = Nothing
%>

Thanks,

Marc
 

Try this:
Code:
Mail.Fields("urn:schemas:httpmail:importance").Value = 1

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Hi Damber,

Thanks for the reply. Is there a particular spot I should place this? I added it first after "Mail.To" and then before "Mail.Send" and after "Mail.Send". I didn't get any error messages but the email was not marked in any way for priority.

Thanks,

Marc
 
When using CDONTS to send mail the priority codes are

0=Low
1=Normal
2=High

So you could try

Mail.Fields("urn:schemas:httpmail:importance").Value = 2



--------------------------------
Rome did not create a great empire by having meetings, they did it by killing all those who opposed them.
 
Thanks, but still no luck. Again, I didn't get any error messages but the email was not flagged as high importance.

Is it something different with CDO vs CDONT?

Thanks,

Marc
 
Think I've got it. Before sending do

Mail.Fields("urn:schemas:httpmail:importance").Value = 2
Mail.Fields.Update

This will update the fields collection with the new value.


--------------------------------
Rome did not create a great empire by having meetings, they did it by killing all those who opposed them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top