[英]Javax mail api with OVH
是否可以使用 OVH 用戶 javax 郵件? 我可以使用 Yahoo 郵件來完成,但是當我嘗試將它與 OVH 一起使用時,出現此錯誤:
在 org.springframeworkjavax.mail.MessagingException: 異常讀取響應; 嵌套異常是:java.net.SocketException:連接重置
連接屬性是:
properties.put("mail.smtp.starttls.enable", "true");
properties.put("mail.smtp.host", host);
properties.put("mail.smtp.user", from);
properties.put("mail.smtp.password", pass);
properties.put("mail.smtp.port", "465");
properties.put("mail.smtp.auth", "true");
properties.put("mail.imap.ssl.enable", "true");
如果有人能看到我在這里錯了...
謝謝。
我通過使用 TLD 端口 587 成功嘗試(如上面的@Mo.Ashfaq 所示)。
OVH 的文檔在此處可見: http : //help.ovh.com/EmailConfiguration
這個配置對我有用:
properties.put("mail.smtp.host", "ssl0.ovh.net");
properties.put("mail.smtp.user", user);
properties.put("mail.smtp.password", pass);
properties.put("mail.smtp.port", "587");
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable", "true");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.