Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SendUsing" configuration value is invalid. error in sending mail in asp.net website.

my url:vjcet.ac.in

in this site hava an srror SendUsing" configuration value is invalid.during send mail

.
my code is
C#
MailMessage mail1 = new MailMessage();
mail1.From = txtEmail.Text;
// ds = FillDataset.ReadXml(Server.MapPath("~/Admin/XML/feedbackmail.xml"));
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Admin/xml/feedbackmail.xml"));
string ToAddress = ds.Tables[0].Rows[0][0].ToString();

// mail1.To = "feedback@stpius.ac.in";
mail1.To = ToAddress;
mail1.Subject = txtComments.Text;

mail1.Body = "Sender : " + txtEmail.Text + "\n" + "Name : " + txtname.Text + "\n" + "Address : " + txtCity.Text + "\n" + "Phone No:  : " + txtFax.Text + "\n" + "Email:" + txtEmail.Text + "\n" + "Message :" + txtCountry.Text + "\n" + "Body :" + txtComments.Text;
SmtpMail.SmtpServer.Insert(0, "27.251.157.141");

SmtpMail.Send(mail1);


I think my ip address is not currect.But in command prompt i checked ping vjcet.ac.in now i got this same is 27.251.157.141

any one please help me
Posted
Updated 28-Apr-12 1:33am
v2
Comments
uspatel 28-Apr-12 7:34am    
Code tag Added.

1 solution

Start here.[^] This walks you through how to test SMTP manually. If it does not work this way you will have to get the correct values from your admin. If it does work then check your code and make sure all settings are getting set properly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900