• JavaMail authenticating 535 error


    org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.163.com:25
    at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242)
    at org.apache.commons.mail.Email.send(Email.java:1267)
    at excelWatcher.MailUtil.send(MailUtil.java:35)
    at excelWatcher.MailUtil.main(MailUtil.java:56)
    Caused by: javax.mail.AuthenticationFailedException: 535 Error: authentication failed

    at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:826)
    at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:761)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:685)
    at javax.mail.Service.connect(Service.java:317)
    at javax.mail.Service.connect(Service.java:176)
    at javax.mail.Service.connect(Service.java:125)
    at javax.mail.Transport.send0(Transport.java:194)
    at javax.mail.Transport.send(Transport.java:124)
    at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
    ... 3 more
    log4j:WARN No appenders could be found for logger (excelWatcher.MailUtil).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

    如果你是163或者126邮箱,那么你检查一下你网页端邮箱设置中 SMTP开启的时候,有授权码的,你重新关闭SMTP服务再重新开启你就知道了,代码中登录的密码其实是授权码。注意注意!!

  • 相关阅读:
    js数组的常见操作( push、pop、unshift、shift、splice、concat、 join)的用法
    js json对象与字符串转换
    js回调函数(callback)
    Array数组 [] 遍历方法
    65.rem布局详解(一图流)
    关于内存泄漏
    JS精粹知识点和我的解释
    再谈布局2-Flex布局
    input和button不同高 和 rem
    正则表达式学习
  • 原文地址:https://www.cnblogs.com/pakchoi/p/5651756.html
Copyright © 2020-2023  润新知