我试图用oauth 2令牌发送一封邮件,我已经有了,但是当我要发送邮件时,它根本不起作用。
我得到了以下信息:
{"status":"400","schemes":"Bearer","scope":"https://mail.google.com/"}这是不起作用的线路:
SMTPTransport smtpTransport = connectToSmtp("smtp.gmail.com", 587, user, oauthToken, true);发布于 2017-07-04 15:44:42
我是这样称呼它的:
String authURL = "https://accounts.google.com/o/oauth2/v2/auth?scope=email&"我为此更改了“电子邮件”:
String authURL = "https://accounts.google.com/o/oauth2/v2/auth?scope=https://mail.google.com/%20profile&"我希望这能帮到别人
https://stackoverflow.com/questions/44907642
复制相似问题