473,382 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 5884
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
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
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
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
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
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
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
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
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 ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.