Answered by:
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 173.194.79.109:25

Question
-
User1357926729 posted
I am using asp.net 4.0 and Access 2010 as the database.I need to send the mail whenever a leave request is submitted and it was working fine when i run it in the local host.when i put the application in the web hosting server and try to submit the leave request,following error is shown during sending the mail: "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 173.194.79.109:25"Can someone help me to resolve this issue for me?We are using windows server 2003 as the web hosting server.Below is my code for sending the mail:
Public Shared Sub sendmail(ByVal strto As String, ByVal strfrom As String, ByVal strsub As String, ByVal strbody As String)
Dim objfrom As New MailAddress(strfrom)
Dim objto As New MailAddress(strto)
Dim objmail As New MailMessage(objfrom, objto)
objmail.Body = strbody
objmail.Subject = strsub
objmail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
objmail.IsBodyHtml = True
objmail.Priority = MailPriority.High
Dim objsmtp As New SmtpClient()
objsmtp.UseDefaultCredentials = True
objsmtp.Credentials = New System.Net.NetworkCredential("Username", "password")
objsmtp.Port = 25
objsmtp.Host = "smtp.gmail.com"
objsmtp.EnableSsl = True
Dim userstate As Object = objmail
objsmtp.Send(objmail)
End SubIs this issue related to server side?
Monday, May 20, 2013 6:14 AM
Answers
-
User1357926729 posted
It is solved...
I changed port no from 25 to 587.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, May 22, 2013 1:53 AM
All replies
-
User197322208 posted
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 173.194.79.109:25talk with email server administrator
Monday, May 20, 2013 8:26 AM -
User281315223 posted
This basically means that you attempted to send a message but didn't recieve a response (for some reason).
I would ensure that the location or URL that you are attempting to contact is correct and that the location is up and running (consider pinging it and checking the connection string). If there is a service running at that location, you'll need to ensure that it is up and running properly and isn't too busy to possibly refuse your connection.
I notice that you are enabling SSL with your message. You'll need to make sure that you are actually sending it to a secure site if you are doing this as I don't know if any issues could arise if you attempt to send a secured message to an unsecured location :
objsmtp.EnableSsl = True
You may want to also check your Firewall or Anti-virus software and ensure that it is not blocking any ports such as 3306 (if it is you should consider making an exception for this).
Monday, May 20, 2013 8:34 AM -
User311508580 posted
Hi sinjumujeeb,
Please kindly contact your support for this issue. :)
Monday, May 20, 2013 10:37 AM -
User1357926729 posted
It is solved...
I changed port no from 25 to 587.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, May 22, 2013 1:53 AM