Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I configured Outlook to use port 25 on my ISP's smtp server. That works fine and I can send email. But if I try to use the server in one of my applications (using JavaMail), I can't connect to the server. Same thing if I try to "manually" telnet to it: I get

telnet: Unable to connect to remote host: Connection refused

How is this possible? And how do I configure my application to be able to send mail?

Edit to add more information:

Wireshark shows that when Outlook tries to send email, it connects to port 25 of the ISP's smtp server. Everything works as expected. When I try 'telnet server 25', the connection never makes it to the server. I see 'Destination unreachable (Communication administratively filtered)', which seems to indicate the firewall at my workplace blocked it. If that's the case, how does the firewall know to let Outlook through?

share|improve this question
Are you sure you didn't configure SSL/TLS in Outlook for SMTP? – thims Dec 22 '11 at 17:42
Exactly how did you setup mail in Outlook to your ISP? If it's POP3, then the connection to the server is on port 110 (POP3), not 25 (SMTP). – Ƭᴇcʜιᴇ007 Dec 22 '11 at 18:42
@techie007, you cannot send mail over POP3. It's always SMTP. – grawity Dec 22 '11 at 19:21
@grawity Yeah ME = brainfart, it's 110 to get it, but it sends on 25. Sorry about that. ;) I was thinking about POP3 'listening' on 110. I'd still like to know how the account is setup in the OP's Outlook. :) – Ƭᴇcʜιᴇ007 Dec 22 '11 at 19:30
Any anti-virus/"Internet Protection" suites installed/enabled? They may block non-email clients (or unknown email clients) from sending from your computer in case you unwittingly become a spam-zombie. – Ƭᴇcʜιᴇ007 Dec 22 '11 at 19:37

I would use a network sniffer like Wireshark (free) to see what Outlook does - Wireshark's "Follow TCP Stream" is useful for this.

share|improve this answer
Microsoft has a free Network Monitor. – thims Dec 22 '11 at 17:43

Bear in mind that Windows can block outbound connections on a per-application basis. Check the Windows Security control panel.

share|improve this answer
up vote 2 down vote accepted

techie007 was on the right track. The anti-virus running on the computer is what was blocking the connection. I'm now running the program from a linux box and that works fine.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .