.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
6.19.2002

 

Send Email


Usually done from web application, but you can do this from WinForms too.
Simple code example:

using System.Web.Mail;

SmtpMail.SmtpServer = "houmailgwi1.hou.aspentech.com";
MailMessage msg = new MailMessage();

msg.Subject = "test from .NET";
msg.From = "danhanan@yahoo.com";
msg.To = "danhanan@yahoo.com";
msg.Body = "did you get this?";

SmtpMail.Send( msg );




Comments: Post a Comment

Powered by Blogger