MailPriority Enumeration

Namespace: System.Net.Mail

Specifies the priority of an email message.

Syntax

<SerializableAttribute>
Public Enum MailPriority

This enumeration is used by the MailMessage class to indicate the importance of an email message.

Members

Member Description
Normal The default priority for an email message.
High Indicates that the email message is of high importance.
Low Indicates that the email message is of low importance.

Remarks

When you set the Priority property of a MailMessage object to one of the MailPriority enumeration values, the Simple Mail Transfer Protocol (SMTP) Extended Simple Mail Transfer Protocol (ESMTP) `X-Priority` header is set appropriately.

For example:

MailMessage mail = new MailMessage();
mail.Subject = "Important Update";
mail.Body = "Please review the attached document.";
mail.To.Add("recipient@example.com");
mail.From = new MailAddress("sender@example.com");
mail.Priority = MailPriority.High;

// Send the email using an SmtpClient (not shown here)