Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [BJXPR01CA020.CHNPR01.prod.partner.outlook.cn]
是因为office365的安全原因,需要启用startTLS机制。 代码中加入
1
email.setStartTLSEnabled(true);
可以解决
0x02
1
Sending the email tothe following server failed : smtp.partner.outlook.cn:587