Sample code for 30+ languages & platforms
VBScript Requires Chilkat v11.0.0+

Set the display priority of a message

See more Email Object Examples

Set X-Priority to 1 (high), 3 (normal), or 5 (low). A mail reader can use it as a display hint. SMTP delivery order is controlled by the mail system.

Chilkat VBScript Downloads

VBScript
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

success = 0

'  Assumes Chilkat is unlocked. See Global Unlock Sample.

set email = CreateObject("Chilkat.Email")
email.From = "Workshop team <events@example.com>"
success = email.AddTo("Alex Rivera","alex@example.net")
If (success <> 1) Then
    outFile.WriteLine(email.LastErrorText)
    WScript.Quit
End If

email.Subject = "Workshop venue change"
email.Body = "Please use the north entrance."
email.AddHeaderField "X-Priority","1 (High)"
outFile.WriteLine("Priority: " & email.GetHeaderField("X-Priority"))

success = email.SaveEml("venue-change.eml")
If (success <> 1) Then
    outFile.WriteLine(email.LastErrorText)
    WScript.Quit
End If

outFile.WriteLine("Saved venue-change.eml.")

outFile.Close