Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Send mail in c# code(asp.net 1.1)?

i want to mail welcome message when a user register in my web site.
i use the below code but it does'nt work.
it's give me this error:(The "SendUsing" configuration value is invalid.)

public static void Send(string mail,string sname,string sfamily)
{
MailMessage mailMsg = new MailMessage();
mailMsg .From = "info@mashhad915.com";
mailMsg .To =mail;
mailMsg .Subject = "Welcome!";
mailMsg .Body ="welcome";
mailMsg.Bcc="info@mashhad915.com";
mailMsg.Cc="info@mashhad915.com";
SmtpMail.SmtpServer.Insert(0,"127.0.0.1");
SmtpMail.Send(mailMsg );

}
please help me?
[677 byte] By [ahmad_n80] at [2007-11-11 9:58:18]
# 1 Re: Send mail in c# code(asp.net 1.1)?
http://www.google.com/search?q=sendusing+configuration+value+invalid
Phil Weber at 2007-11-11 23:12:15 >