javax.mail.MessagingException: Could not connect to SMTP host: email-smtp.us-east-1.amazonaws.com, port: 25;
问题 public void emailTest() { Properties properties=new Properties(); properties.put("mail.smtp.host", "email-smtp.us-east-1.amazonaws.com"); properties.put("mail.smtp.port", 587); properties.put("mail.debug", "true"); try{ Session session=Session.getInstance(properties); Message msg=new MimeMessage(session); msg.setFrom(new InternetAddress("test@gmail.com", "Test")); msg.setRecipient(RecipientType.TO, new InternetAddress("test@gmail.com", "Test")); msg.setSubject("Test Subject"); msg.setText(