即使我将端口号设置为2587获取错误无法连接到SMTP主机:email-smtp.eu-west-1.amazonaws.com,端口:25

时间:2017-05-05 04:11:21

标签: email amazon-web-services smtp javamail amazon-ses

static final String HOST =" email-smtp.eu-west-1.amazonaws.com&#34 ;; static final int PORT = 2587;

private static Properties getProperties() {


    Properties props = new Properties();
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.host", HOST);
    props.put("mail.smtp.port", PORT); 

}

0 个答案:

没有答案