Database Mail - Could not connect (no such host)!

  • Hi all,

    Tried to find a fix on here for my issue but everything I've found re the above problem me and my team have eliminated so was wondering if someone else could suggest something?

    I've just installed SQL Server 2008 R2 on a new virtual server (VM Ware) running Windows Server 2008 R2 Enterprise which was installed from an image of another virtual server which I also installed SQL Server on which performs perfectly.

    The SQL Server install has gone fine however, I've set up database mail and used exactly the same settings and configurations as the previous server but keep getting the following error/exception message when I try to send a test email through SSMS:

    "The mail could not be sent to the recipients because of the mail server failure.......Exception message: Could not connect to mail server (No such host is known)"

    Things we've looked into:

    Correct spelling of everything

    Tested port 25 is open

    No antivirus on virtual server to block connection

    Antivirus on Exchange server allows connections via port 25

    Other servers with the same database mail setup can send and receive test emails

    Can telnet to Exchange server from virtual server

    Can ping Exchange server from virtual server

    We're at a bit of a loss, can anyone suggest anything please? :ermm:


    MCITP
    MCTS - E-Business Card
    Twitter: WWDMark

    Try not! Do or do not, there is no try

    email: info@weekendwebdesign.co.uk
    Personal Website: http://markallen.co.uk/
    Business Website: https://www.weekendwebdesign.co.uk

  • I know you said everything is spelled correctly and you could connect via telnet and ping.

    I'm verifying that you are trying telnet and ping by name and not IP address, the reason I ask is I want to be sure that name resolution is out of the question.

    You didn't by change accidently set a port number in the account setup?

    Because really you've tested everything I could think of..

    CEWII

  • Elliott Whitlow (6/17/2013)


    I know you said everything is spelled correctly and you could connect via telnet and ping.

    I'm verifying that you are trying telnet and ping by name and not IP address, the reason I ask is I want to be sure that name resolution is out of the question.

    You didn't by change accidently set a port number in the account setup?

    Because really you've tested everything I could think of..

    CEWII

    Thanks for your reply Elliot, we've used both IP and actual name to telnet onto and ping the Exchange server. I've also double checked the various ports and they're all fine as well. (Baffled!)

    Incidentally, if I setup a new DB mail account using my gmail account details I get another exception message stating "Cannot send mails to mail server. (The operation has timed out.)"

    I'm at a complete loss! :crazy:


    MCITP
    MCTS - E-Business Card
    Twitter: WWDMark

    Try not! Do or do not, there is no try

    email: info@weekendwebdesign.co.uk
    Personal Website: http://markallen.co.uk/
    Business Website: https://www.weekendwebdesign.co.uk

  • As for your internal exchange I'm sorry but you have me baffled as well..

    For GMail that is a little tricky BUT they are pretty straightforward..

    Here is what I have used:

    I blanked out a bunch of stuff but you get the idea..

    CEWII

  • Thanks Elliot, we're scheduled to have another look at this one tomorrow. The only difference I've got on my gmail setup is the port number so I'll give that a go. Cheers again.


    MCITP
    MCTS - E-Business Card
    Twitter: WWDMark

    Try not! Do or do not, there is no try

    email: info@weekendwebdesign.co.uk
    Personal Website: http://markallen.co.uk/
    Business Website: https://www.weekendwebdesign.co.uk

  • Are the two machines no the same subnet? If not then there might be an ACL on a border router blocking the port.

  • kevaburg (6/19/2013)


    Are the two machines no the same subnet? If not then there might be an ACL on a border router blocking the port.

    Good thinking Penfold! 🙂

    They're both on the same subnet and we can ping the exchange server from the virtual server so doesn't look like its an ACL issue. (Didn't even think about that scenario, cheers!!)


    MCITP
    MCTS - E-Business Card
    Twitter: WWDMark

    Try not! Do or do not, there is no try

    email: info@weekendwebdesign.co.uk
    Personal Website: http://markallen.co.uk/
    Business Website: https://www.weekendwebdesign.co.uk

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply