You could try telneting to it. Its not a fool proof way to do it but usually if you can telnet to your SMTP server you can connect to it via
Java Mail.
However, the best way to avoid these configuration headaches is to speak to your network administrator.