JavaMail: How to solve SocketException?
问题 I am using the following code to send emails from a Java application. On my computer it works fine, on second computer too, but on another computer (in the same network) it doesn't, although we're using the same connection settings. public void connect() throws MessagingException { Authenticator auth = new Authenticator(){ @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(smtpUser, smtpPassword); } }; Properties props = new Properties()