473,509 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5889
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
9028
by: Peter Croft | last post by:
Hello. Can someone please tell me how to set the priority of an email message sent from an ASP script using CDOSYS as below - set oCdoMsg = server.createobject("CDO.Message") oCdoMsg.from=......
11
2541
by: Steve | last post by:
Hi, i know this is an old question (sorry) but its a different problem, i need to write a binary file as follows 00000011 00000000 00000000 00000101 00000000 11111111
0
1792
by: Jan Pakinski | last post by:
Hi all, I'm writing a email sending program using c# and i found the mail priority setting is not working no matter what i have set. There is no "red exclamation mark(for high priority mail)"...
3
6935
by: Stu Banter | last post by:
I have a couple of small single-thread Console utilities doing cpu-intensive stuff. Is there an easy way to set the program execution priority to LOW from within the program ? Now I pause the...
13
4490
by: | last post by:
Hi all, Coming from the good old VB6 days we were told to always destroy our objects as follows:- Dim obj as New MyObject ' do some work with obj obj = Nothing I have been doing this in...
1
1272
by: vinodkus | last post by:
MailMessage objMail = new MailMessage(); MailAttachment objAttach;// = new MailAttachment(); string strPath = ""; try { strPath = System.IO.Path.GetFileName(File1.PostedFile.FileName); }...
4
3406
by: jjh5030 | last post by:
This is a programming assignment. You are asked to work with pointers. Be aware that error messages are often not very helpful when your pointers point to bad locations. Therefore, reserve...
4
4643
by: =?Utf-8?B?cGJsYWNrYnVybg==?= | last post by:
Summary Getting the error message Run time error 424 Object Required when attempting to assign a value to a C# COM visible property of type object. I have created a COM visible class as below ...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.