Email Problem

Discussion in 'Email' started by Recency, Feb 10, 2010.

  1. Hello:
    While trying to send an email from my website, I get the following error:

    Server Error in '/HomemadeArtDrawings' Application.
    --------------------------------------------------------------------------------

    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 64.79.170.145:25
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.Sockets.SocketException: 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 64.79.170.145:25

    Source Error:


    Line 14:
    Line 15: Dim smtpClient As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()
    Line 16: smtpClient.Send(mailMessage)
    Line 17:
    Line 18:


    Source File: C:\Documents and Settings\ss59ss36\My Documents\Visual Studio 2008\WebSites\HomemadeArtDrawings\FeedBack.aspx.vb Line: 16

    Stack Trace:


    [SocketException (0x274c): 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 64.79.170.145:25]
    System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
    System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
    System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

    [WebException: Unable to connect to the remote server]
    System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +5420699
    System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +202
    System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21
    System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +332
    System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +160
    System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +159
    System.Net.Mail.SmtpClient.GetConnection() +35
    System.Net.Mail.SmtpClient.Send(MailMessage message) +1213

    [SmtpException: Failure sending mail.]
    System.Net.Mail.SmtpClient.Send(MailMessage message) +1531
    FeedBack.btnSend_Click(Object sender, EventArgs e) in C:\Documents and Settings\ss59ss36\My Documents\Visual Studio 2008\WebSites\HomemadeArtDrawings\FeedBack.aspx.vb:16
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

    Here is my web config:

    <system.net >
    <mailSettings >
    <smtp>
    <network host ="mail.homemadeartdrawings.com" port="25" defaultCredentials="true"/>
    </smtp>
    </mailSettings>
    </system.net>


    If you think the problem lies in my web config, then can you please post a correct example web config code that I should use for this server.

    Recency
     
  2. Ray

    Ray

    I suspect that the smtp port is being disrupted or blocked on your end.

    Perform a telnet test to our mail server using port 25. This will determine it if is being blocked.

    telnet mail.homemadeartdrawings.com 25

    You may also want to check with your ISP and verify if they are also block port 25 on their end.
     
  3. If they are blocking port 25 (and that's pretty common these days), try port 587.
     
  4. Ray:

    I put the webconfig on the server and now it does send the emails. However, from time to time I get greylisted error. Do you know what that means?

    Ill try the 587 to see what that does
     
  5. Ray

    Ray

    Greylisting is a feature that reduces the number of spam that gets into the emails Inbox. The way it works is that it will reject the first attempt to send the email. It issues a 400 status code which tells the sending mail server, which is us, to try again at a given interval. Our mail server is setup to try sending the email again after 90 seconds. The second retry should. Greylisting is a setting on the receiving parties mail server and not from the sending party. You may want to contact that person that you are trying to send email to and request that they put you on their white list. This should bypass greylisting.
     
  6. Last edited: Oct 14, 2015

Share This Page