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!

Adding an alert to a CDO message 1

Status
Not open for further replies.
Nov 29, 2001
72
0
0
US
Guys,
I have a request to mark EMAILs as urgent (!) that are getting sent as a result of a vacation request. I have looked at the CDO properties and methods and I don't see a way to do this.

However, since is is common knowledge that the more you look at something the less you see, I was wondering if anyone out there knows how to mark EMAIL as urgent using CDO.

Thanks in advance,
Dave
 
Dave,
I have found this code somewhere i wish i can remember so i can give credit to the person who wrote it.

this would work on Win200o and Win2003

Code:
<%

'******************************************************
'*** Send the message Using CDOSYS Win2k & Win2003 ****
'******************************************************
  ' CDO mail object
     myMailServer = sEmailServer

    sch = "[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/"[/URL]
    Set cdoConfig = Server.CreateObject("CDO.Configuration")
    cdoConfig.Fields.Item(sch & "sendusing") = 2
    cdoConfig.Fields.Item(sch & "smtpserverport") = iEmailPort
    cdoConfig.Fields.Item(sch & "smtpserver") = myMailServer
    cdoConfig.fields.update

    Set cdoMessage = Server.CreateObject("CDO.Message")
    Set cdoMessage.Configuration = cdoConfig
    cdoMessage.From = Trim(Session("useremailadd"))
    cdoMessage.To = sSendAuthorisingReq
    cdoMessage.BCC = sConEmailMonitor
    cdoMessage.Subject = sSubject
    cdoMessage.TextBody = sBodyText & sEmailBlurb
'
cdoMessage.item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpauthenti[/URL]
cate").value = 1 ' use clear text authenticate
'
cdoMessage.item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendpassword[/URL]
").value ="mypassword"
'
cdoMessage.item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusername[/URL]
").value ="yourusername"
    cdoMessage.Fields.Item("urn:schemas:mailheader:Keywords") = "COKESHOP"
    cdoMessage.Fields.Item("urn:schemas:mailheader:X-Priority") = 1
    cdoMessage.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") =
"High"
    cdoMessage.Fields.Item("urn:schemas:mailheader:X-Message-Flag") = "Do
not Forward"
    cdoMessage.Fields.Item("urn:schemas:mailheader:Sensitivity") =
"Company-Confidential"
    cdoMessage.Fields.Item("urn:schemas:mailheader:Importance") = "High"
    cdoMessage.Fields.Update
    cdoMessage.Send
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing

%>

Good luck


The solution is simple, the problem is complex.
 
Very nice post. I will give it a try. I would suggest anyone using CDO in .NET copy the code in your post.

Thanks again,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top