This documentation is archived and is not being maintained.

MailDefinition.Priority Property

Gets or sets the priority of the e-mail message.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public MailPriority Priority { get; set; }

Property Value

Type: System.Net.Mail.MailPriority
One of the MailPriority values. The default is Normal.


The selected value is not one of the MailPriority values.

The Priority property indicates the relative priority of the e-mail message.

The following code example sets the Priority property to the value chosen from a DropDownList control on a Web Forms page.

This code example is part of a larger example provided for the MailDefinition class.

if (sourcePriority.SelectedValue == "Normal")
    md.Priority = MailPriority.Normal;
else if (sourcePriority.SelectedValue == "High")
    md.Priority = MailPriority.High;
else if (sourcePriority.SelectedValue == "Low")
    md.Priority = MailPriority.Low;

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.