How Do I?

[How Do I:] Send Email Asynchronously with ASP.NET

By Chris Pels|18 minutes|
In this video, Chris Pels shows how to use the System.Net.Mail classes in ASP.NET to send an asynchronous email message. First, see how to configure a web site to send email using the element in the web.config file. Next, create a simple user interface for entering email information. Then learn how to create use the MailMessage class to create an email message in the code behind for the page. As part of that process create an event handler for the asynchronous callback following the sending of the email. In the event handler see how to use the instance of the AsynchCompletedEventArgs class which provides information about the email sending process. Finally, send a test email asynchronously, following the steps in the debug mode, and view the actual email received from the process.

DOWNLOADS: Code (C#)|Code (VB)|MP3|MP4|WMV

This article was originally created on September 24, 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