Hi,
am working on e-commerce website, i have hosted the website using godaddy.
if the user try to contact email is not going, it working locally but it is not working when hoisted...
please any one out there help me...
here is my code in controller,
public ActionResult Contact(Contact contact)
{
if (ModelState.IsValid)
{
MailMessage mail = new MailMessage();
mail.To.Add("info@desidesigns.com.au");
mail.From = new MailAddress("gagana@scudds.com");
mail.Subject = contact.Subject;
mail.Body = "Name=" + contact.Name + "\n" + "Emailaddress=" + contact.Emailaddress + "\n" + "Subject=" + contact.Subject + "\n" + "Enquiry=" + contact.Enquiry + "\n" + "Order No=" + contact.OrderNo;
mail.IsBodyHtml = true;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient();
smtp.Host = "relay-hosting.secureserver.net";
smtp.Port = 25;
smtp.UseDefaultCredentials = true;
smtp.Credentials = new System.Net.NetworkCredential("info@desidesigns.com.au", "admin@123");
smtp.EnableSsl = true;
smtp.Send(mail);
return View(contact);
}
else
{
return View(contact);
}
}
web config code,
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="info@desidesigns.com.au" >
<network host="relay-hosting.secureserver.net" port="25" defaultCredentials="false" userName="info@desidesigns.com.au" password="admin@123" enableSsl="true"/>
</smtp>
br mode="hold" />
Error ', getting is this..,
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 68.178.232.62:25