Wednesday, June 20, 2007

Set Email Priority cum Importance Via ASP Using CDO.Message / CDO Message Importance

Set Email Priority cum Importance Via ASP Using CDO.Message

Works for me:

Set objMessage = Server.CreateObject("CDO.Message")

'YADDA YADDA YADDA

objMessage.Fields("urn:schemas:httpmail:Importance").Value = 2
objMessage.Fields("urn:schemas:mailheader:importance").Value = "High"

objMessage.Fields("urn:schemas:httpmail:priority").Value = 1
objMessage.Fields("urn:schemas:mailheader:priority").Value = 1

objMessage.Fields("urn:schemas:mailheader:X-MSMail-Priority").Value = "High"
objMessage.Fields("urn:schemas:mailheader:X-Priority").Value = 1

objMessage.Fields("urn:schemas:httpmail:X-MSMail-Priority").Value = "High"
objMessage.Fields("urn:schemas:httpmail:X-Priority").Value = 1

'IMPORTANT!
objMessage.Fields.update

5 comments:

  1. pal, this info was SO cool. Thank you very much! :D

    ReplyDelete
  2. I've been searching around for about an hour for this. Worked great! Thanks!

    ReplyDelete
  3. Always glad to be of help when it comes to helping people in these kinds of situations!

    Shame that it took an hour to find my post though. What keywords were you searching for? Hopefully I can try and make my post a bit more visible.

    ReplyDelete
  4. I know this is an old blog, but I've been searching for an answer to this same solution specific to exchange servers (2007) and have used every angle of:

    objemail.Fields("urn:schemas:httpmail:Importance").Value = 2
    objemail.Fields("urn:schemas:httpmail:priority").Value = 1
    objemail.Fields("urn:schemas:mailheader:importance").Value = "High"
    objemail.Fields("urn:schemas:mailheader:priority").Value = 1
    objemail.Fields("urn:schemas:mailheader:X-MSMail-Priority").Value = "High"
    objemail.Fields("urn:schemas:mailheader:X-Priority").Value = 1
    objemail.Fields("urn:schemas:httpmail:X-MSMail-Priority").Value = "High"
    objemail.Fields("urn:schemas:httpmail:X-Priority").Value = 1


    and nothing is working. Suggestions?

    ReplyDelete
  5. oh boy. if only i could remember :).

    you did do this line too right? this is the important one:

    objemail.Fields.update

    ReplyDelete