欢迎讨论:解决163邮箱转发邮件提示报错554 DT:SPM smtp12几种方案!

-发帖者:
-参与讨论....
【主题】:解决163邮箱转发邮件提示报错554 DT:SPM smtp12几种方案

由于163 的反垃圾机制,(坑爹机制。)

一般出现 554有在1)大致分为以下几种情况:

1. 内容不符合要求,含有违规内容

2. 格式不规范

3. 发送人账户和邮箱服务器的账户不一致

不同于网上说的,什么发送给自己,抄送给别人就能发送成功,我使用debug模式,查看错误原因:

//建立邮件会话      
        final String userName=props.getProperty("username");
        final String password=props.getProperty("password");
        
        Session session = Session.getDefaultInstance(props, new Authenticator() {
            //身份认证
            protected PasswordAuthentication getPasswordAuthentication() {
                return new PasswordAuthentication(userName, password);
            }
        });
        session.setDebug(true);

打印错误如下:

250-PIPELINING
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-coremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UrvxefWUCa0xDrUUUUj
250-STARTTLS
250 8BITMIME
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
DEBUG SMTP: Found extension "AUTH=LOGIN", arg "PLAIN"
DEBUG SMTP: Found extension "coremail", arg "1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UrvxefWUCa0xDrUUUUj"
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: protocolConnect login, host=smtp.163.com, [email protected], password=<non-null>
DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2 
DEBUG SMTP: Using mechanism LOGIN
DEBUG SMTP: AUTH LOGIN command trace suppressed
DEBUG SMTP: AUTH LOGIN succeeded
DEBUG SMTP: use8bit false
MAIL FROM:<[email protected]>
250 Mail OK
RCPT TO:<[email protected]>
250 Mail OK
DEBUG SMTP: Verified Addresses
DEBUG SMTP:   [email protected]
DATA
354 End data with <CR><LF>.<CR><LF>
Date: Wed, 18 Sep 2019 18:54:42 +0800 (CST)

554 DT:SPM 163 smtp7,C8CowAB35PzzDIJdQNrUNg--.61091S2 1568804085,please see http://mail.163.com/help/help_spam_16.htm?ip=221.226.10.242&hostid=smtp7&time=1568804085
DEBUG SMTP: got response code 554, with response: 554 DT:SPM 163 smtp7,C8CowAB35PzzDIJdQNrUNg--.61091S2 1568804085,please see http://mail.163.com/help/help_spam_16.htm?ip=221.226.10.242&hostid=smtp7&time=1568804085

RSET
250 OK
DEBUG SMTP: MessagingException while sending, THROW: 
com.sun.mail.smtp.SMTPSendFailedException: 554 DT:SPM 163 smtp7,C8CowAB35PzzDIJdQNrUNg--.61091S2 1568804085,please see http://mail.163.com/help/help_spam_16.htm?ip=221.226.10.242&hostid=smtp7&time=1568804085

发现原因如下:

 

我默认使用的账户是[email protected],但是我邮箱服务器地址使用的是[email protected],后来改成默认为[email protected],重新操作,发送成功!!

 

 发表评论     发表时间:『2019-09-18 19:46:25』


扫描二维码关注网站最新动态