Click here to Skip to main content
16,013,918 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Getting
InnerException:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

thanx in advance.....
Posted
Comments
Kuthuparakkal 23-Aug-12 2:01am    
post your code buddy.. am very poor in guessing your code :)
[no name] 23-Aug-12 2:26am    
code plz
subhusingh 23-Aug-12 2:35am    
MailMessage message = new MailMessage();

message.To.Add(new MailAddress("ToAddress"));
message.From = new MailAddress("Myid");






message.Subject = "hii";
message.Body = "hii";

// message.Attachments.Add(attachment);


SmtpClient client = new SmtpClient();
client.Port = 25;
client.Host = "mail.nic.in";
System.Net.NetworkCredential nc = new System.Net.NetworkCredential("mailid","password")
client.EnableSsl = true;
client.UseDefaultCredentials = false;

client.Credentials = nc;
client.Send(message);

1 solution

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