首页 > 编程语言> > Spring/Springboot项目使用Hutool工具类发送邮件报错:java.lang.ClassNotFoundException: javax.mail.internet.MimeMulti
Spring/Springboot项目使用Hutool工具类发送邮件报错:java.lang.ClassNotFoundException: javax.mail.internet.MimeMulti
作者:互联网
报错如下:
java.lang.ClassNotFoundException: javax.mail.internet.MimeMultipart
解决方案:
在pom.xml文件中不仅要引入hutool工具类,还要引入com.sun.mail;代码如下:
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.3.4</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
标签:lang,MimeMultipart,ClassNotFoundException,hutool,报错,mail,javax 来源: https://www.cnblogs.com/roud/p/16372908.html