in reply to Checking SMTP ports.

There are all kinds of checks that you could do. You could try to ping the host (Net::Ping) and see if that works - although that doesn't test that port 25 is open. You could try to connect to port 25 - but that doesn't guarantee that it's actually a mail server listening, or that your connection hasn't been redirected to the ISP's mail server (which might require SMTP Auth, limit who you can send as, etc).

I would think that the only safe, robust way of checking would be to send a test email from the user to themselves, and include some kind of id in the body so that you know that it's been sent properly. You can then immediately delete that email once you see it. This will allow you to test both their SMTP and POP/IMAP settings at the same time, and uses modules that you've probably got installed anyway, rather than introducing something new.

Replies are listed 'Best First'.
Re^2: Checking SMTP ports.
by jdtoronto (Prior) on Sep 21, 2006 at 18:35 UTC
    I already have Net::Ping check that there is a machine at the other end. What I need to do is offer a Check Server button where they enter the server details.

    However your idea of looping an email around is a good one, I will give it some thought.

    jdtoronto