This is a quick and easy one for anyone else trying to send mail using ASP.NET.
First, add the using statement for the appropriate namespace:
Then, create a MailMessage object:
And then, finally - send it using the static method off SmtpMail:
Another example of why .NET rocks, what used to be an annoyingly complex task is now suddenly relegated to being easy as anything...
(This article is to make up for this monster article which discusses opening file handles on physical devices...)Permalink