MailDefinition.Priority Property

Definition

Gets or sets the priority of the email message.

public System.Net.Mail.MailPriority Priority { get; set; }

Property Value

One of the MailPriority values. The default is Normal.

Exceptions

The selected value is not one of the MailPriority values.

Examples

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;
}

Remarks

The Priority property indicates the relative priority of the email message.

Applies to

Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also