This tutorial will show you how to send a simple email message with priorities using ASP.NET 2.0 and VB.NET

Sending a email with CCs and BCCs using ASP.NET 2.0 and VB.NET is actually very simple.

First, you will need to import the System.Net.Mail namespace.

The System.Net.Mail namespace contains the SmtpClient and MailMessage Classes that we need in order to send the email and specify the priorities.

We use the btnSubmit_Click event to do the work.

We then call the emailClient.Send to send the message using the variables from our ASP.NET coded page. We then use a switch statement to determine the desired level of priority and set the Priority property of our MailMessage object accordingly.

The front end .aspx page looks something like this:

The flow for the code behind page is as follows.

Download Source Files