[How Do I:] Use ASP.NET to Send Email from a Web Site

By Chris Pels|25 minutes|

In this video Chris Pels shows how to create and send an email in an ASP.NET web site. First, learn about the core classes in the System.Net.Mail namespace for sending mail in an ASP.NET web site. See how to create an email message using the MailMessage class including how to use the MailAddress class for the From address and how to include one or more To addresses. Next, see how email is sent using the SmtpClient class. Finally, learn about the additional options for configuring the email message such as CC, BCC, Priority, and adding attachments.


This article was originally created on August 28, 2008

Author Information

Chris Pels

Chris Pels – Chris has been instrumental in the architecture, development, and implementation of a wide variety of business systems and databases as a technology consultant since 1986. He has extensive experience in business analysis, technical specifications, database design, several programming languages including C# and VB.NET, and statistical analysis. He holds a Ph.D. from The University of Michigan and has been a speaker at Microsoft TechEd, Microsoft DevDays, VSLive, numerous events in New England