Java实现163网易邮箱消息发送

依赖maven依赖 <dependency> <groupId>javax.mail</groupId> <artifactId>javax.mail-api</artifactId> </dependency> <dependency> <groupId>com.sun.mail</groupId> <artifactId>jakarta.mail</artifactId> </dependency>jar包依赖进去搜索名称下载https://mvnrepository.com/代码public class MailUtils { /** * 发件人邮箱 */ private static final String HOST="yangbuyiya@163.com"; /** * 邮箱密码或