commons-email-1.2.jar实现简单的邮件发送_伊圣杨的博客-爱代码爱编程
核心代码
SimpleEmail email = new SimpleEmail();
email.setCharset("utf-8");
email.setHostName("smtp.163.com");
email.setAuthentication("账号名字","切记不是邮箱密码,是开启服务后给的密码");
email.addTo("********@163.com");//收件人邮箱
email.setFrom("*******@163.com");//发件人邮箱
email.setSubject("Subject");
email.setMsg("你好");
email.send();
用到的一些java包
链接:https://pan.baidu.com/s/1Ppo7Z7q82kIzwxZqZswglw?pwd=e9ng
提取码:e9ng