Priority Property


This property specifies the priority level of current email .

Data Type: Long

Remarks

This value is placed in message header as "X-Priority" value. Different mail readers may interpret the X-Priority setting differently; some may not interpret it at all. Popular readers interpret "4"=low, "3"=normal and "1"=high.

Example

[Visual Basic 6.0] The following example demonstrates how to send email with EASendMail SMTP Component, but it doesn't demonstrates the events usage. To get the full samples of EASendMail, please refer to Samples section.

[VB6, VBA - Set Email Priority]

Const ConnectNormal = 0
Const ConnectSSLAuto = 1
Const ConnectSTARTTLS = 2
Const ConnectDirectSSL = 3
Const ConnectTryTLS = 4

Private Sub SendEmail()
  Dim oSmtp As EASendMailObjLib.Mail
  Dim nPriority As Integer
  
  Set oSmtp = New EASendMailObjLib.Mail
  oSmtp.LicenseCode = "TryIt"
  
  ' Your SMTP server address
  oSmtp.ServerAddr = "smtp.emailarchitect.net"

  ' User and password for ESMTP authentication
  oSmtp.UserName = "test@emailarchitect.net"
  oSmtp.Password = "testpassword"

  ' ConnectTryTLS means if server supports SSL/TLS connection, SSL/TLS is used automatically
  oSmtp.ConnectType = ConnectTryTLS
    
  oSmtp.FromAddr = "test@emailarchitect.net"
  oSmtp.AddRecipient "Support Team", "support@emailarchitect.net", 0

  nPriority = 1 'High priority

  oSmtp.Priority = nPriority
  oSmtp.Subject = "Test"
  oSmtp.BodyText = "Hello, this is a test...."
 
  If oSmtp.SendMail() = 0 Then
    MsgBox "Message delivered!"
  Else
    MsgBox oSmtp.GetLastErrDescription()
  End If
End Sub