Send mail in ASP .NET with the SMTP ASP.NET Mail Demo

 

This sample demonstrates how easy it is to send email in ASP.NET with the Smtp .NET component (included with the PowerTCP Mail for .NET).This sample simply displays a form containing the fields necessary to send mail (such as "TO:","FROM","Subject", etc). These fields are posted to an ASP.NET page. This ASP.NET page contains code to get the fields from the request, create a simple email message by setting the properties of the Message object, and send the email using the SMTP component. In addition, this sample demonstrates posting a file with HTTP, retrieving the file data, and creating an attachment from the file data. The POP Client sample is only available in VB.NET. If you would like to see a C# demonstration, check out the POP Client.

This sample is not available Online

However, it is included in the PowerTCP Mail for .NET installation.

This script could be easily modified to enable automatic email from your ASP.NET page for any purpose including form registrations, notifications, or product advertisements. Your ASP.NET script could be as simple as a single line of code to send a quick email, or as complex as creating a MIME email with attachments.

If you are interested in this sample be sure to see these links: