We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDK版本: jdk1.8.0_281 hutool版本: 5.8.27
String host="smtp.office365.com"; int port= 587; // 我登陆https://outlook.live.com/使用的账号 String username = "xxx@qq.com"; String password = "*****"; // 收件人邮箱 String toEmail = "abc@test.com"; MailAccount account = new MailAccount(); account.setHost(host); account.setPort(port); account.setAuth(true); account.setFrom("小红<xxx@qq.com>"); account.setUser(username); account.setPass(password); account.setSocketFactoryPort(port); account.setStarttlsEnable(true); account.setSslEnable(false); account.setTimeout(25000); account.setConnectionTimeout(25000);
try { MailSSLSocketFactory sf = new MailSSLSocketFactory(); sf.setTrustAllHosts(true); account.setCustomProperty("mail.smtp.ssl.socketFactory", sf); } catch (GeneralSecurityException e) { throw new RuntimeException(e); } MailUtil.send(account,toEmail, "测试邮件", "这是一封测试邮件。", false); 2. 堆栈信息 AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [SI2P153CA0017.APCP153.PROD.OUTLOOK.COM 2024-04-25T15:34:18.198Z 08DC64C0B4284A22] Exception in thread "main" java.lang.RuntimeException: cn.hutool.extra.mail.MailException: AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [SI2P153CA0017.APCP153.PROD.OUTLOOK.COM 2024-04-25T15:34:18.198Z 08DC64C0B4284A22] at com.bangdao.ubp.bill.web.controller.HealthChecker.main(HealthChecker.java:290) Caused by: cn.hutool.extra.mail.MailException: AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [SI2P153CA0017.APCP153.PROD.OUTLOOK.COM 2024-04-25T15:34:18.198Z 08DC64C0B4284A22] at cn.hutool.extra.mail.Mail.send(Mail.java:398) at cn.hutool.extra.mail.MailUtil.send(MailUtil.java:416) at cn.hutool.extra.mail.MailUtil.send(MailUtil.java:194) at cn.hutool.extra.mail.MailUtil.send(MailUtil.java:176) at cn.hutool.extra.mail.MailUtil.send(MailUtil.java:161) at com.bangdao.ubp.bill.web.controller.HealthChecker.main(HealthChecker.java:286) Caused by: javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful [SI2P153CA0017.APCP153.PROD.OUTLOOK.COM 2024-04-25T15:34:18.198Z 08DC64C0B4284A22] at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:947) at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:858) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:762) at javax.mail.Service.connect(Service.java:364) at javax.mail.Service.connect(Service.java:222) at javax.mail.Service.connect(Service.java:171) at javax.mail.Transport.send0(Transport.java:230) at javax.mail.Transport.send(Transport.java:100) at cn.hutool.extra.mail.Mail.doSend(Mail.java:412) at cn.hutool.extra.mail.Mail.send(Mail.java:390) ... 5 more
我想问的是现在使用hutool使用outlook账号密码发送邮件,这个host到底是填什么?我查阅到的信息是
The text was updated successfully, but these errors were encountered:
期待你可以给一个明确的答复。谢谢
Sorry, something went wrong.
嗯……我想你需要检查以下内容:
xxx@outlook.com
No branches or pull requests
版本情况
JDK版本: jdk1.8.0_281
hutool版本: 5.8.27
问题描述(包括截图)
我想问的是现在使用hutool使用outlook账号密码发送邮件,这个host到底是填什么?我查阅到的信息是
![9E69072D-096D-4d68-BBE1-444E0D06FEEE](https://private-user-images.githubusercontent.com/31396915/325678283-354fdc46-673c-427a-9b63-1a8bbf8d770d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2MTc0MzAsIm5iZiI6MTcyMTYxNzEzMCwicGF0aCI6Ii8zMTM5NjkxNS8zMjU2NzgyODMtMzU0ZmRjNDYtNjczYy00MjdhLTliNjMtMWE4YmJmOGQ3NzBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDAyNTg1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThhMzc0NDZjMGUwNjE5YmQ0NTcyZWZjY2YzMzkwMGFjZjAwNjU3ZDRlNWRiMjI3Y2Q5NzY2ZDUyODRlYjFmMTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DhDb-LNQuZPj5BT35zNoT8aKDdcjsOKZCDj0vMWJFo4)
The text was updated successfully, but these errors were encountered: