+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Newsletter SMTP setup issue - 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 faile

Newsletter SMTP setup issue - 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 faile

9 posts, 0 answered
  1. Richard
    Richard avatar
    77 posts
    Registered:
    24 Oct 2007
    29 Mar 2010
    Link to this post
    Hi,
    I'm using the newletter module for the first time on the production server and am trying to set up the SMTP settings.
    For some reason I keep getting the following message:

    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 xx.xx.xx.xx:80  (replace xx.xx.xx.xx with my IP address).

    I have tried using the external ip address, internal ip address, localhost, 127.0.0.1, internal dns name, global dns name and still it fails!  Anyone have any ideas?
    Thanks
    R
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Mar 2010
    Link to this post
    Hello Richard Leung,

    The error seems to be related to your SMTP settings.  Your SMTP server is not accessible - wrong IP address, username or password. Please verify that your settings are correct. For instance create a user control and send an email.

    System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
    message.To.Add("yourmail@test.com");
    message.Subject = "Subject";
    message.From = new System.Net.Mail.MailAddress("mytestmail@test.com");
    message.Body = "This is the message body";
    // 25 is the default port
    int port = 25;
    System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("YOUR_HOST_HERE", port);
    smtp.Send(message);

    Check whether you have an dynamically generated dll under Sitefinity/ServiceAssemblies folder. This dll should be deleted when you switch your servers. On the next request to the Newsletters module the dll should be automatically generated again. If there is no dll or it cannot be generated, the request does not reach the web service or you are working in medium trust, while the generation could be done in full trust only

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Richard
    Richard avatar
    77 posts
    Registered:
    24 Oct 2007
    29 Mar 2010
    Link to this post
    Thanks for the code.

    Ok.  I tested using the code mentioned above.  The following works with the code above:
    internal dns name
    "127.0.0.1"
    internal IP Addrses
    "localhost"

    The following doesn't working:
    The external IP address !

    Now, to give you a bit more information about the original message, SiteFinity could not connect or get a response from the external IP address no matter what host I entered.  Any ideas?

    P.s. there is a dynamically generated dll file!

    Thanks
  4. Richard
    Richard avatar
    77 posts
    Registered:
    24 Oct 2007
    29 Mar 2010
    Link to this post
    I deleted the dll file.  Now the error message appears whenever I click on Newsletter.
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    29 Mar 2010
    Link to this post
    Hi Richard Leung,

    Could you please check if you are running in Medium trust? In this trust level, the assembly could not be generated due to permission issues. 

    You may try to run the project again locally, generate the assembly and upload it to the live site.

    Sincerely yours,
    Georgi
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Richard
    Richard avatar
    77 posts
    Registered:
    24 Oct 2007
    29 Mar 2010
    Link to this post
    Sorry how to I check my trust level ?
    Thanks
  7. Richard
    Richard avatar
    77 posts
    Registered:
    24 Oct 2007
    29 Mar 2010
    Link to this post
    I presume you are referring to the Trust level within IE? That is currently on medium. 
    I reuploaded the dll file and the page is back to normal.  But still the SMTP Error remains.
  8. Richard
    Richard avatar
    77 posts
    Registered:
    24 Oct 2007
    29 Mar 2010
    Link to this post
    HI,
    UPDATE:
    I have managed to set the SMTP settings via the internal local website i.e. not through the production website which uses the external IP.  Both sites point to the same database of course.

    I've added a few subscribers, but we have not yet received the email and it has been around 10 mins now.  I don't think I am going about this correctly!


  9. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    31 Mar 2010
    Link to this post
    Hi Richard,

    When you have sent the e-mails what did the newsletter module say? Did it say that the newsletter was sent properly? If yes I presume that the messages are in the Spool of your SMTP server and cannot be sent to the e-mail addresses specified.

    Georgi was refering to the ASP.NET Trust Level. This is generally set by your hosting provider. You can check with them in which trust level your website is running.

    All the best,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
9 posts, 0 answered