Client was not authenticated to send anonymous mail during MAIL FROM
问题 I am trying to send an email in a java application calling this method: public static void sendEmail() { // Create object of Property file Properties props = new Properties(); // this will set host of server- you can change based on your requirement props.put("mail.smtp.host", "smtp.office365.com"); // set the port of socket factory //props.put("mail.smtp.socketFactory.port", "587"); // set socket factory //props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory"); // set