i have tried coding like this
public void sendMail(string toList, string fromlist, string ccList, string subject, string body)
{
MailMessage message = new MailMessage();
SmtpClient smtpClient = new SmtpClient();
MailAddress fromAddress = new MailAddress(fromlist);
message.From = fromAddress;
message.To.Add(toList);
if (ccList != null && ccList != string.Empty)
{
message.CC.Add(ccList);
}
message.Subject = subject;
message.IsBodyHtml = true;
message.Body = body;
smtpClient.Host = "127.0.0.1";
smtpClient.Port = 25;
smtpClient.UseDefaultCredentials = true;
smtpClient.Credentials = new System.Net.NetworkCredential(txtfromadd.Text, txtpwd.Text);
smtpClient.Send(message);
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
//string fromadd = txtfromadd.Text;
string tocc = "[email protected]";
sendMail(txtToAddress.Text, txtfromadd.Text, tocc, txtSubject.Text, txtContent.Text);
}
but i got error in this line smtpClient.Send(message);
iI want to change any settings in config...
but i got error in this line smtpClient.Send(message);
iI want to change any settings in config...

Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Aug 24, 2011, 9:41 PM EDT
what's the error you faced?
follow this article
hope it help you..
Suthish NairRank #92 · 22.8K reputationPosted Aug 24, 2011, 10:11 PM EDT
anjumathi kumar54 reputationPosted Aug 24, 2011, 10:39 PM EDT
anjumathi kumar54 reputationPosted Aug 24, 2011, 10:47 PM EDT
wat i want to change?
anjumathi kumar54 reputationPosted Aug 24, 2011, 10:48 PM EDT
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Aug 24, 2011, 11:26 PM EDT
go through this thread