无法发送使用JavaMail和客户经理的Gmail电子邮件(错误400) [英] Unable to send gmail e-mail using Javamail and Account Manager (Error 400)

查看:22280
本文介绍了无法发送使用JavaMail和客户经理的Gmail电子邮件(错误400)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Android的客户经理对我的方式进入Gmail中进行验证,所以我可以从设备发送电子邮件。

在发送过程中,它出现(从日志中),一切都连接并验证好了,但它给了我以下错误:

  E / SMTP传输错误:334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ ==
    类javax.mail.MessagingException的

这时候去codeD读取:

  {地位:400,计划:旗手,范围:https://mail.google.com/}

从其他等问题,我已经看到了,这意味着该令牌已过期。然而,这是不是在我的情况的话,我已经试过无效令牌并获得一个新的;同样的问题。

下面是如何验证我:

  AM = AccountManager.get(本);
        选项​​=新包();
        占我= NULL;        帐户[] =帐户am.getAccounts();
        对于(帐户:帐户){
            如果(a.name.equals(TEST_ACCOUNT_EMAIL)及&放大器; a.type.equals(com.google)){
                我=一;
            }
        }
        如果(我!= NULL){
            am.getAuthToken(我的oauth2:HTTPS://mail.google.com/,空,为此,新OnTokenAcquired(),NULL);
        }

下面是它出现后,我点击发送测试电子邮件对自己完整的日志(注认证成功)

  03-04 18:20:15.875 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG:setDebug:JavaMail的1.4.1版
03-04 18:20:15.875 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG:mail.imap.fetchsize:16384
03-04 18:20:15.885 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG:启用SASL
03-04 18:20:15.885 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG:SASL机制允许:XOAUTH2
03-04 18:20:16.175 4847-4859 / com.samay.markasread2 I / System.out的:A3注销
03-04 18:20:16.175 4847-4859 / com.samay.markasread2 I / System.out的:DEBUG:IMAPStore连接死
03-04 18:20:16.175 4847-4859 / com.samay.markasread2 I / System.out的:DEBUG:IMAPStore清理,真正的力量
03-04 18:20:16.175 4847-4859 / com.samay.markasread2 I / System.out的:DEBUG:IMAPStore清理完成
03-04 18:20:16.185 4847-4859 / com.samay.markasread2 I / System.out的:A3注销
03-04 18:20:16.336 4847-4859 / com.samay.markasread2 I / System.out的:* BYE注销请求
03-04 18:20:16.336 4847-4859 / com.samay.markasread2 I / System.out的:A3确定73好日子(成功)
03-04 18:20:16.336 4847-4859 / com.samay.markasread2 I / System.out的:DEBUG:IMAPStore连接死
03-04 18:20:16.336 4847-4859 / com.samay.markasread2 I / System.out的:DEBUG:IMAPStore清理,强制假
03-04 18:20:16.336 4847-4859 / com.samay.markasread2 I / System.out的:DEBUG:IMAPStore清理完成
03-04 18:20:16.346 4847-5263 / com.samay.markasread2 I / System.out的:* OK GIMAP准备好从18.111.30.155 67mb91143115qga请求
03-04 18:20:16.346 4847-5263 / com.samay.markasread2 I / System.out的:A0能力的
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:*能力的IMAP4rev1 UNSELECT IDLE NAMESPACE配额ID的Xlist儿童的X GM-EXT-1 XYZZY SASL-IR AUTH = AUTH XOAUTH = XOAUTH2 AUTH =普通AUTH =纯CLIENTTOKEN
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:A0确定这就是所有她写! 67mb91143115qga
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:IMAP DEBUG:AUTH:XOAUTH
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:IMAP DEBUG:AUTH:XOAUTH2
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:IMAP DEBUG:AUTH:平纹
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:IMAP DEBUG:AUTH:纯CLIENTTOKEN
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG:protocolConnect登录,主机= imap.gmail.com,user=@gmail.com,密码= LT;非空&GT ;
03-04 18:20:16.446 4847-5263 / com.samay.markasread2 I / System.out的:IMAP SASL DEBUG:机制:XOAUTH2
03-04 18:20:16.456 4847-5263 / com.samay.markasread2 I / System.out的:IMAP SASL DEBUG:SASL客户XOAUTH2
03-04 18:20:16.456 4847-5263 / com.samay.markasread2 I / System.out的:A1 AUTHENTICATE XOAUTH2
03-04 18:20:16.546 4847-5263 / com.samay.markasread2 I / System.out的:+
03-04 18:20:16.546 4847-5263 / com.samay.markasread2 I / System.out的:IMAP SASL DEBUG:挑战:
03-04 18:20:16.546 4847-5263 / com.samay.markasread2 I / System.out的:IMAP SASL DEBUG:回调长度:1
03-04 18:20:16.546 4847-5263 / com.samay.markasread2 I / System.out的:IMAP SASL DEBUG:回调0:myjavax.security.auth.callback.NameCallback@64df4000
03-04 18:20:16.546 4847-5263 / com.samay.markasread2 I / System.out的:IMAP SASL DEBUG:回应:user=CENSOREDEMAIL@gmail.comauth=Bearer ya29.1.AADtN_UU_dI1wnX8uehx7yiIHeeI3oOTl1m5Pj3jyEZHtjpeCalTuSQvfbbhtYsG57H7IPZTDcWO5WwAKta8KvP3xYmPV3A6YbLCEBG15MDVUksRL9mMuLqH9u0 :
03-04 18:20:16.546 4847-5263 / com.samay.markasread2 I / System.out的: dXNlcj1wdXJpcm9oYW5AZ21haWwuY29tAWF1dGg9QmVhcmVyIHlhMjkuMS5BQUR0Tl9VVV9kSTF3blg4dWVoeDd5aUlIZWVJM29PVGwxbTVQajNqeUVaSHRqcGVDYWxUdVNRdmZiYmh0WXNHNTdIN0lQWlREY1dPNVd3QUt0YThLdlAzeFltUFYzQTZZYkxDRUJHMTVNRFZVa3NSTDltTXVMcUg5dTABAQ==
03-04 18:20:16.756 4847-5263 / com.samay.markasread2 I / System.out的:*能力的IMAP4rev1 UNSELECT IDLE NAMESPACE配额ID的Xlist儿童的X GM-EXT-1 UIDPLUS COM $ P $ =干燥综合征ENABLE DEFLATE MOVE CONDSTORE ESEARCH
03-04 18:20:16.756 4847-5263 / com.samay.markasread2 I / System.out的:A1 OK CENSOREDEMAIL@gmail.com CENSORED_FIRST_NAME CENSORED_LAST_NAME认证(成功)
03-04 18:20:16.756 4847-5263 / com.samay.markasread2 I / System.out的:A2能力的
03-04 18:20:16.856 4847-5263 / com.samay.markasread2 I / System.out的:*能力的IMAP4rev1 UNSELECT IDLE NAMESPACE配额ID的Xlist儿童的X GM-EXT-1 UIDPLUS COM $ P $ =干燥综合征ENABLE DEFLATE MOVE CONDSTORE ESEARCH
03-04 18:20:16.856 4847-5263 / com.samay.markasread2 I / System.out的:A2 OK成功
03-04 18:20:16.896 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG:setDebug:JavaMail的1.4.1版
03-04 18:20:16.896 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:useEhlo真,假useAuth
03-04 18:20:16.896 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:试图连接到主机smtp.gmail.com,端口587,isSSL假
03-04 18:20:17.176 4847-5263 / com.samay.markasread2 I / System.out的:220 mx.google.com ESMTP r40sm644209qga.23 - gsmtp
03-04 18:20:17.176 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:连接到主机smtp.gmail.com,端口:587
03-04 18:20:17.176 4847-5263 / com.samay.markasread2 I / System.out的:EHLO本地主机
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:250-mx.google.com为您服务,[18.111.30.155]
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:250-SIZE 35882577
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:250-8BITMIME
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:250-STARTTLS
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:250 ENHANCEDSTATUS codeS
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:250 CHUNKING
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展大小,ARG35882577
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名8BITMIMEARG
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名STARTTLSARG
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名ENHANCEDSTATUS codeSARG
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名CHUNKINGARG
03-04 18:20:17.277 4847-5263 / com.samay.markasread2 I / System.out的:STARTTLS
03-04 18:20:17.387 4847-5263 / com.samay.markasread2 I / System.out的:220 2.0.0准备启动TLS
03-04 18:20:17.597 4847-5263 / com.samay.markasread2 I / System.out的:EHLO本地主机
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:250-mx.google.com为您服务,[18.111.30.155]
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:250-SIZE 35882577
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:250-8BITMIME
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:250-AUTH LOGIN PLAIN XOAUTH XOAUTH2纯CLIENTTOKEN
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:250 ENHANCEDSTATUS codeS
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:250 CHUNKING
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展大小,ARG35882577
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名8BITMIMEARG
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名AUTHARGLOGIN PLAIN XOAUTH XOAUTH2纯CLIENTTOKEN
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名ENHANCEDSTATUS codeSARG
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:DEBUG SMTP:发现扩展名CHUNKINGARG
03-04 18:20:17.697 4847-5263 / com.samay.markasread2 I / System.out的:AUTH XOAUTH2 dXNlcj1zZW5kLWFkZHJAZ21haWwuY29tAWF1dGg9QmVhcmVyIHlhMjkuMS5BQUR0Tl9VVV9kSTF3blg4dWVoeDd5aUlIZWVJM29PVGwxbTVQajNqeUVaSHRqcGVDYWxUdVNRdmZiYmh0WXNHNTdIN0lQWlREY1dPNVd3QUt0YThLdlAzeFltUFYzQTZZYkxDRUJHMTVNRFZVa3NSTDltTXVMcUg5dTABAQ==
03-04 18:20:18.007 4847-5263 / com.samay.markasread2 I / System.out的:334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ ==
03-04 18:20:18.007 4847-5263 / com.samay.markasread2 E / SMTP传输错误:334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ ==
    类javax.mail.MessagingException的


解决方案

的JavaMail 1.5.2将包括 OAuth的2支持。您可以尝试快照发布的。

I am using Android's Account Manager to authenticate my way into Gmail so I can send an e-mail from the device.

During the send process, it appears (from the logs) that everything connects and authenticates okay, but it gives me the following error:

E/SMTP TRANSPORT ERROR﹕ 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
    class javax.mail.MessagingException

Which when decoded reads:

{"status":"400","schemes":"Bearer","scope":"https://mail.google.com/"}

From other SO questions, I've seen that this means that the token is expired. However, this is NOT the case in my case, I have tried invalidating the token and getting a new one; same problem.

Here's how I authenticate:

 am = AccountManager.get(this);




        options = new Bundle();
        Account me = null;

        Account[] accounts = am.getAccounts();
        for(Account a: accounts){
            if(a.name.equals(TEST_ACCOUNT_EMAIL) && a.type.equals("com.google")){
                me = a;
            }
        }
        if (me != null){
            am.getAuthToken(me, "oauth2:https://mail.google.com/", null, this, new OnTokenAcquired(), null);
        }

Here's the full log which appears after I click to send a test e-mail message to myself (note authentication success)

    03-04 18:20:15.875    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG: setDebug: JavaMail version 1.4.1
03-04 18:20:15.875    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG: mail.imap.fetchsize: 16384
03-04 18:20:15.885    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG: enable SASL
03-04 18:20:15.885    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG: SASL mechanisms allowed: XOAUTH2
03-04 18:20:16.175    4847-4859/com.samay.markasread2 I/System.out﹕ A3 LOGOUT
03-04 18:20:16.175    4847-4859/com.samay.markasread2 I/System.out﹕ DEBUG: IMAPStore connection dead
03-04 18:20:16.175    4847-4859/com.samay.markasread2 I/System.out﹕ DEBUG: IMAPStore cleanup, force true
03-04 18:20:16.175    4847-4859/com.samay.markasread2 I/System.out﹕ DEBUG: IMAPStore cleanup done
03-04 18:20:16.185    4847-4859/com.samay.markasread2 I/System.out﹕ A3 LOGOUT
03-04 18:20:16.336    4847-4859/com.samay.markasread2 I/System.out﹕ * BYE LOGOUT Requested
03-04 18:20:16.336    4847-4859/com.samay.markasread2 I/System.out﹕ A3 OK 73 good day (Success)
03-04 18:20:16.336    4847-4859/com.samay.markasread2 I/System.out﹕ DEBUG: IMAPStore connection dead
03-04 18:20:16.336    4847-4859/com.samay.markasread2 I/System.out﹕ DEBUG: IMAPStore cleanup, force false
03-04 18:20:16.336    4847-4859/com.samay.markasread2 I/System.out﹕ DEBUG: IMAPStore cleanup done
03-04 18:20:16.346    4847-5263/com.samay.markasread2 I/System.out﹕ * OK Gimap ready for requests from 18.111.30.155 67mb91143115qga
03-04 18:20:16.346    4847-5263/com.samay.markasread2 I/System.out﹕ A0 CAPABILITY
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ A0 OK Thats all she wrote! 67mb91143115qga
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP DEBUG: AUTH: XOAUTH
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP DEBUG: AUTH: XOAUTH2
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP DEBUG: AUTH: PLAIN
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP DEBUG: AUTH: PLAIN-CLIENTTOKEN
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG: protocolConnect login, host=imap.gmail.com, user=@gmail.com, password=<non-null>
03-04 18:20:16.446    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP SASL DEBUG: Mechanisms: XOAUTH2
03-04 18:20:16.456    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP SASL DEBUG: SASL client XOAUTH2
03-04 18:20:16.456    4847-5263/com.samay.markasread2 I/System.out﹕ A1 AUTHENTICATE XOAUTH2
03-04 18:20:16.546    4847-5263/com.samay.markasread2 I/System.out﹕ +
03-04 18:20:16.546    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP SASL DEBUG: challenge:  :
03-04 18:20:16.546    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP SASL DEBUG: callback length: 1
03-04 18:20:16.546    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP SASL DEBUG: callback 0: myjavax.security.auth.callback.NameCallback@64df4000
03-04 18:20:16.546    4847-5263/com.samay.markasread2 I/System.out﹕ IMAP SASL DEBUG: response: user=CENSOREDEMAIL@gmail.comauth=Bearer ya29.1.AADtN_UU_dI1wnX8uehx7yiIHeeI3oOTl1m5Pj3jyEZHtjpeCalTuSQvfbbhtYsG57H7IPZTDcWO5WwAKta8KvP3xYmPV3A6YbLCEBG15MDVUksRL9mMuLqH9u0 :
03-04 18:20:16.546    4847-5263/com.samay.markasread2 I/System.out﹕ dXNlcj1wdXJpcm9oYW5AZ21haWwuY29tAWF1dGg9QmVhcmVyIHlhMjkuMS5BQUR0Tl9VVV9kSTF3blg4dWVoeDd5aUlIZWVJM29PVGwxbTVQajNqeUVaSHRqcGVDYWxUdVNRdmZiYmh0WXNHNTdIN0lQWlREY1dPNVd3QUt0YThLdlAzeFltUFYzQTZZYkxDRUJHMTVNRFZVa3NSTDltTXVMcUg5dTABAQ==
03-04 18:20:16.756    4847-5263/com.samay.markasread2 I/System.out﹕ * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH
03-04 18:20:16.756    4847-5263/com.samay.markasread2 I/System.out﹕ A1 OK CENSOREDEMAIL@gmail.com CENSORED_FIRST_NAME CENSORED_LAST_NAME authenticated (Success)
03-04 18:20:16.756    4847-5263/com.samay.markasread2 I/System.out﹕ A2 CAPABILITY
03-04 18:20:16.856    4847-5263/com.samay.markasread2 I/System.out﹕ * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH
03-04 18:20:16.856    4847-5263/com.samay.markasread2 I/System.out﹕ A2 OK Success
03-04 18:20:16.896    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG: setDebug: JavaMail version 1.4.1
03-04 18:20:16.896    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: useEhlo true, useAuth false
03-04 18:20:16.896    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 587, isSSL false
03-04 18:20:17.176    4847-5263/com.samay.markasread2 I/System.out﹕ 220 mx.google.com ESMTP r40sm644209qga.23 - gsmtp
03-04 18:20:17.176    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: connected to host "smtp.gmail.com", port: 587
03-04 18:20:17.176    4847-5263/com.samay.markasread2 I/System.out﹕ EHLO localhost
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ 250-mx.google.com at your service, [18.111.30.155]
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ 250-SIZE 35882577
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ 250-8BITMIME
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ 250-STARTTLS
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ 250-ENHANCEDSTATUSCODES
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ 250 CHUNKING
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "SIZE", arg "35882577"
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "8BITMIME", arg ""
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "STARTTLS", arg ""
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "CHUNKING", arg ""
03-04 18:20:17.277    4847-5263/com.samay.markasread2 I/System.out﹕ STARTTLS
03-04 18:20:17.387    4847-5263/com.samay.markasread2 I/System.out﹕ 220 2.0.0 Ready to start TLS
03-04 18:20:17.597    4847-5263/com.samay.markasread2 I/System.out﹕ EHLO localhost
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ 250-mx.google.com at your service, [18.111.30.155]
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ 250-SIZE 35882577
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ 250-8BITMIME
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ 250-ENHANCEDSTATUSCODES
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ 250 CHUNKING
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "SIZE", arg "35882577"
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "8BITMIME", arg ""
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN"
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ DEBUG SMTP: Found extension "CHUNKING", arg ""
03-04 18:20:17.697    4847-5263/com.samay.markasread2 I/System.out﹕ AUTH XOAUTH2 dXNlcj1zZW5kLWFkZHJAZ21haWwuY29tAWF1dGg9QmVhcmVyIHlhMjkuMS5BQUR0Tl9VVV9kSTF3blg4dWVoeDd5aUlIZWVJM29PVGwxbTVQajNqeUVaSHRqcGVDYWxUdVNRdmZiYmh0WXNHNTdIN0lQWlREY1dPNVd3QUt0YThLdlAzeFltUFYzQTZZYkxDRUJHMTVNRFZVa3NSTDltTXVMcUg5dTABAQ==
03-04 18:20:18.007    4847-5263/com.samay.markasread2 I/System.out﹕ 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
03-04 18:20:18.007    4847-5263/com.samay.markasread2 E/SMTP TRANSPORT ERROR﹕ 334 eyJzdGF0dXMiOiI0MDAiLCJzY2hlbWVzIjoiQmVhcmVyIiwic2NvcGUiOiJodHRwczovL21haWwuZ29vZ2xlLmNvbS8ifQ==
    class javax.mail.MessagingException

解决方案

JavaMail 1.5.2 will include OAuth 2 support. You can try the SNAPSHOT release now.

这篇关于无法发送使用JavaMail和客户经理的Gmail电子邮件(错误400)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆