We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30585
    • 833 Posts
    Hi all,

    This is a rather strange one. I'm using Mandrill as my SMTP server for my outbound mails sent from the site, but somehow it only works when I test it locally; that is on my developement computer. When I take the site to the hosting environment and try to send a test message using Formit, I get the following error:

    Send Failed
    Mailer error info: SMTP Error: Could not connect to SMTP host.
    Server Debug Information:
    
    Warning: fsockopen(): unable to connect to ssl://smtp.mandrillapp.com:465 (Connection timed out) in /hsphere/local/home/mydomain.com/core/model/modx/mail/phpmailer/class.smtp.php on line 122
    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
    


    I've used BobRay's QuickEmail Snippet and it also fails to send mail.

    I can swear that I'm using the same settings that I use in development environment; but it's just not working.
    I'm in desperate need of help as the site should be operation before 5:00 AM EST.

    Is there anything I'm missing?
      A MODx Fanatic
    • Check with your hosting company. They may have that port blocked.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 30585
        • 833 Posts
        Yeah, I just got off chat with them and they're really not helpful at all. I read on Mandrill's docs that I can use port 25, but even that is not working for me. These guys don't even want to help since we use Exchange 365 for our mail. This is really frustrating.

        Any possible workarounds?
          A MODx Fanatic
        • Who is the hosting company? Maybe someone else uses them as well, and has found a solution.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 30585
            • 833 Posts
            Sorry I forgot, It's IXWebhosting. I'm definitely not impressed anymore.
              A MODx Fanatic
              • 3749
              • 24,544 Posts
              If you haven't done this, go to System System Settings and type SMTP in the search box at the upper right. See if there are any settings that don't match the ones on you localhost install.

              I think some hosts block outgoing SMTP if the mail_from address isn't an account you have with them or if they don't think it's real for some reason.

              I don't envy you. I hate debugging email problems. You might try using Gmail to send with the same settings. That might tell you if the problem is with Mandrill or your host (I'm betting on the host, though).
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 30585
                • 833 Posts
                @BobRay Thanks for the insight. Now that you mentioned it, I'm actually going to add the mail_from account, since it's actually not added in the host's account list. I have a feeling this will fix it. I normally use Exchange 365 for my mail, but I feel that your suggestion will help. I know it's not Mandril the issue. I spoke to them last night and after pressing hard, they eventually admitted that unless I use their mailing system or somehow develop an app that will send email via the internal 127 IP, I was screwed.

                Thanks again.
                  A MODx Fanatic
                • I suspect your host is blocking outgoing traffic on the exim ports unless being sent by exim to avoid/reduce the likelihood of abuse. I know we had to adjust the firewall slightly for one of our customers. They should have been able to confirm that and/or help you locate an alternative support port (587 perhaps).

                  If you do get it working please post back with the solution for other users.
                    Patrick | Server Wrangler
                    About Me: Website | TweetsMODX Hosting
                  • I read somewhere that a "[email protected]" mail account had to exist before any outgoing mail would be enabled, but I'm not sure if this applied to using the host's mail or any mail at all.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 30585
                      • 833 Posts
                      Guys,

                      Just so you know. IXWebhosting just admitted they block outgoing SMTP mail unless it's originating from their mail system and they said they wouldn't mind losing my business if it came down to it. There's no way they will work something out for me; not even limit the number of emails sent per hour. This absolutely sucks, but I'm moving on.

                      Thanks for all your help.
                        A MODx Fanatic