Tuesday, February 13, 2007

Send e-mail by c# coding

So simple as this:

using System.Net.Mail;

MailMessage msgMail = new MailMessage("spammer@haqckers.net","carso@cheeweng.com","Your subject","your message");
SmtpClient smtpC = new SmtpClient("localhost");
smtpC.Send(msgMail);

but you need to set your IIS smtp mail correctly. Check out below

http://codebetter.com/blogs/peter.van.ooijen/archive/2006/04/05/142331.aspx

No comments: