QianLi
QianLi

Reputation: 1098

VBScript Sending Email with High Importance

I used VBScript to write a function to send email automatically.

With .Configuration.Fields
            .Item(cdoSendUsingMethod)                   = cdoSendUsingPort
            .Item(cdoSMTPServer)                        = "SMTPHOST.redmond.corp.microsoft.com"
            .Item(cdoSMTPServerPort)                    = 25
            .Item(cdoSMTPAuthenticate)                  = cdoNTLM
            .Item("urn:schemas:httpmail:importance")    = sMailPriority
            .Update

When I want to send email with high important, I set the sMailPriority to 2. When I test with the Gmail, it worked. But when I using outlook2010, it didn't work.

Upvotes: 0

Views: 4496

Answers (1)

Kul-Tigin
Kul-Tigin

Reputation: 16950

Some e-mail clients requires different headers to set e-mail priority.
Try to add all of these fields.

.Item("urn:schemas:httpmail:importance") = sMailPriority
.Item("urn:schemas:httpmail:priority") = 1 'sMailPriority
.Item("urn:schemas:mailheader:X-Priority") = 1 'sMailPriority

Upvotes: 1

Related Questions