CDO Object: Setting Mail Priority (Urgent, Medium, Low)

V

Vittorio Pavesi

Hello,
I'm using CDO in my VB Application.
Does anybody know how to set the Mail priority (Urgent, Medium, Low) ??
Thanks

Vittorio
----------------------------------------------------------------------------
--------------------------------
Const cdoSendUsingMethod =
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer =
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPConnectionTimeout =
"http://schemas.microsoft.com/cdo/configuration/smtpConnectionTimeout"
iMsg = CreateObject("CDO.Message")
iConf = CreateObject("CDO.Configuration")
Flds = iConf.Fields
Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = TxtSMTPServer.Text
Flds(cdoSMTPConnectionTimeout) = 15
Flds.Update()
Body = "<html><p align='center'><font face='tahoma' size='2'>" & _
"Test message generated at: " & Now().ToString & _
"<br><br>Visit&nbsp;<a
href='http://healthmonitor.sourceforge.net'>http://healthmonitor.sourceforge
..net</a></font></p></html>"
With iMsg
..Configuration = iConf
..To = TxtTo.Text
..From = "Health Monitor"
..Sender = TxtFrom.Text
..Subject = "Health Monitor - Notification"
..HTMLBody = Body
..Send()
End With
 
C

Cor

Hi Vittorio Pavesi,

Does anybody know how to set the Mail priority (Urgent, Medium, Low) ??

Can it be something (not tested)?
\\\
Dim mailprior As String() = {"Normal", "Low", "High"}
.........
..Priority = CType(mailprior(1), MailPriority)
///

I hope this helps a little bit?

Cor
 
C

Cor

Hi Vittorio,

You can use this, but I think that it will work either

mess.Priority = MailPriority.High
mess.Priority = MailPriority.Low
mess.Priority = MailPriority.Normal

Give a message as it works?

Cor
 
J

Jay B. Harlow [MVP - Outlook]

Vittorio,
I'm using CDO in my VB Application.
There are no less then three varieties of CDO. Which are you using?

Have you looked over the articles at:

http://www.microeye.com/resources/res_outlookvsnet.htm

There are one or two on sending mail with "CDO".

Have you looked at the CDO interop assembly (with object browser) to see
what the name of the priority field is? What the values are?

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top