Hi all,
"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 IP:Port" this is the error i am geeting while sending an email using System.Net.Mail
My Code here :
MailMessage objMail;
SmtpClient objSMTP;
// Now create the email
objMail = new MailMessage();
objMail.To.Add("ToAddress");
objMail.From = new MailAddress("FromAddress", "Sender Name");
objMail.Body = "Message";
objMail.IsBodyHtml = true;
objMail.Subject = "Test"
// set up the smtp object
objSMTP = new System.Net.Mail.SmtpClient("domainname", port);//
objSMTP.Credentials = new NetworkCredential("webmastermail", "pwd");
//objSMTP.UseDefaultCredentials = true;
// send the email
objSMTP.Send(objMail);
this code working fine in my developement machine but when i upload to the server it causes the ERROR
can any one help me
thanks in advance
Checkbelow link
www.systemnetmail.com
Haissam Abdul Malak
MCAD.NET
| Blog |