469,648 Members | 1,196 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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

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
Nov 20 '05 #1
4 5611
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
Nov 20 '05 #2
I doesn't work..
MailPriority type is not available.
Thanks

Vittorio

"Cor" <no*@non.com> wrote in message
news:3f**********************@reader21.wxs.nl...
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

Nov 20 '05 #3
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
Nov 20 '05 #4
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

"Vittorio Pavesi" <vi*************@aonet.it> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl... 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

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Jan Pakinski | last post: by
3 posts views Thread by Stu Banter | last post: by
13 posts views Thread by | last post: by
1 post views Thread by vinodkus | last post: by
4 posts views Thread by jjh5030 | last post: by
4 posts views Thread by =?Utf-8?B?cGJsYWNrYnVybg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.