Skip Navigation LinksHome > Categories > Code from a Category

Send Email with CC and BCC using ASP.NET 2.0 and VB.NET



User Name: codelecturer
Name: Mike Chauhan
Contact Me: www.datawebcoder.com/ContactUs.aspx
Home Page: www.datawebcoder.com
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD... [More]
Viewed Times: 2239
Add Date: 12/05/2012
This article will show you how to send a simple email message with CCs and BCCs 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 CCs.


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 use the CC and Bcc methods to add the emails we would like to CC to.


The front end .aspx page looks something like this:

The flow for the code behind page is as follows.


Happy Programming!!!

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
 
    
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.