The Code I\'m Using to send a simple mail
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
import java.io.*;
import javax.activation.Da
Sounds like a firewall problem (firewalls silently drop packets that are not allowed, which is why you would be seeing a Connection Timeout.
Can you try
H:\> telnet smtp.gmail.com 25
Connecting To smtp.gmail.com...Could not open connection to the host, on port 25
: Connect failed
on your server and see whether you get a connection? (I'm behind a firewall here that does not allow connections to gmail)
While running in jboss check whether your running using run.bat -b 0.0.0.0
.
If not try and it should work fine.