Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cdosys set mail priority/importance 1

Status
Not open for further replies.

jemminger

Programmer
Jun 25, 2001
3,453
US
ok, i've googled for hours on this, and i now am setting the importance/priority of my email in SIX fields, and still nothing happens to the priority... it is always sent as "normal":

Code:
'---- CdoPriorityValues ---
Const cdoPriorityNonUrgent = -1
Const cdoPriorityNormal = 0
Const cdoPriorityUrgent = 1

'---- CdoImportanceValues  ----
Const cdoImportanceLow = 0
Const cdoImportanceNormal = 1
Const cdoImportanceHigh = 2

'---- MSMailPriority ----
Const MSMailPriorityHigh = 0
Const MSMailPriorityNormal = 3
Const MSMailPriorityLow = 5

	Dim iMsg, iConf, Flds
	
	Set iMsg = CreateObject("CDO.Message")
	Set iConf = CreateObject("CDO.Configuration")

	Set Flds = iConf.Fields
	Flds("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")[/URL] = 1
	Flds("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")[/URL] = "\inetpub\mailroot\pickup"
	
	Flds("urn:schemas:httpmail:importance") = cdoImportanceHigh
	Flds("urn:schemas:httpmail:priority") = cdoPriorityUrgent
	Flds("urn:schemas:mailheader:importance") = cdoImportanceHigh
	Flds("urn:schemas:mailheader:priority") = cdoPriorityUrgent
	Flds("urn:schemas:mailheader:X-MSMail-Priority") = MSMailPriorityHigh
	Flds("urn:schemas:mailheader:X-Priority") = cdoPriorityUrgent
	Flds.Update

	Set iMsg.Configuration = iConf
	iMsg.From = sFrom
	iMsg.To = sTo

	iMsg.Subject = sSubject
	iMsg.TextBody = sBody

	iMsg.Send

does anyone know why this isn't working? this is running on a server2003 box.

thanks



-jeff
lost: one sig, last seen here.
 
thanks - the problem ended up being that i was setting these properties against the CDO.Configuration.Fields instead of CDO.Message.Fields



-jeff
lost: one sig, last seen here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top