The type javax.mail.internet.MimeMessage cannot be resolved. It is indirectly referenced from required .class files
pom加:
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
</dependency>
<dependency>
<groupId >com.sun.mail</groupId >
<artifactId >javax.mail</artifactId >
</dependency>
<!-- https://mvnrepository.com/artifact/javax.mail/mail -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>