Sending Email with System.Net.Mail
Posted by: ScottGus Blog,
on 10 Dec 2005 |
View original | Bookmarked: 0 time(s)
.NET 2.0 includes much richer Email API support within the System.Net.Mail code namespace. I've seen a few questions from folks wondering about how to get started with it. Here is a simple snippet of how to send an email message from sender@foo.bar.com to multiple email recipients (note that the To a CC properties are collections and so can handle multiple address targets): MailMessage message = new MailMessage(); message.From = new MailAddress("sender@foo.bar.com"); ...