com.sun.mail.smtp.SMTPSendFailedException:554 5.2.0 STOREDRV.Submission.Exception

时间:2024-03-15 18:51:32

使用outlook发送邮件报异常:com.sun.mail.smtp.SMTPSendFailedException:554 5.2.0 STOREDRV.Submission.Exception
我的配置如下:

Properties p = new Properties();
p.setProperty(“mail.smtp.timeout”, 30000);
p.setProperty(“mail.transport.protocol”, “smtp”);
p.setProperty(“mail.smtp.auth”, “true”);
p.put(“mail.smtp.socketFactory.fallback”,“true”);
p.put(“mail.smtp.socketFactory.class”,“javax.net.ssl.SSLSocketFactory”);
p.put(“mail.smtp.starttls.enable”, “true”);

5.2.0这个应该就是配置的发送邮箱和host不匹配,我就是换了host而没改导致的
com.sun.mail.smtp.SMTPSendFailedException:554 5.2.0 STOREDRV.Submission.Exception
虽然我菜吧,但是中文资料硬是没找到参考这个事我…算了不喷了,克制