See

Sending e-mail in ASP with CDOSYS
Sending Emails in ASP.NET