abgtemp
asked on
Mark email as High Importance in vbscript
I need a little help with this one..... Could someone give me a little assistance in how to edit the vbscript below to send an email marked as "High Importance". Thanks in advance.
Set objEmail = CreateObject("CDO.Message")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objEmail.Subject = "Test Mail"
objEmail.From = "me@mail.com"
objEmail.To= "you@mail.com"
objEmail.TextBody = "This is an important email"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.east.cox.net"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
change cdoMail to objEmail in your code - make sure it's before the objEmail.Configuration.Fie lds.Update line...
ASKER
Still nothing. Were you able to get it to work on your side?
Odd - no, I haven't...tried several different methods - but I use system.mail in .Net for my projects now, so I didn't have many sample scripts to check.
http://www.activexperts.com/ActivEmail/ provides a means for accomplishing it, if you're wanting to try that instead.
http://www.activexperts.com/ActivEmail/ provides a means for accomplishing it, if you're wanting to try that instead.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what's different from my first post?
ASKER
Sir Bounty, I'm not quite sure what was wrong, but I could not get your code to work. But this was this was a coding error on my part. After looking at Amazing Tech's solution, it appears that I didn't do something right. Since Sir Bounty did have this solution earlier but I was unable to code it correctly, I will give him the most points. But I do thank Amazing Tech for providing a code using my existing code. Thanks to both of you. I'm bumping up the points and splitting the points.
I glad it worked for you abgtemp.
Probably because your cdo mail object was named objEmail and the one from the example link was cdoMail. Presumably that wasn't changed?
Anyway - glad you got it working. Thanx for the grade! :^)
Anyway - glad you got it working. Thanx for the grade! :^)
Missing line was:
objEmail.Fields.Update
instead of only:
objEmail.Configuration.Fie lds.Update
objEmail.Fields.Update
instead of only:
objEmail.Configuration.Fie
ASKER