使用上面三个类的代码
来源:互联网 发布:16詹姆斯数据 编辑:程序博客网 时间:2024/06/05 06:08
publicstatic void main(String[] args){
//这个类主要是设置邮件
MailSenderInfo mailInfo= new MailSenderInfo();
mailInfo.setMailServerHost("smtp.163.com");
mailInfo.setMailServerPort("25");
mailInfo.setValidate(true);
mailInfo.setUserName("han2000lei@163.com");
mailInfo.setPassword("**********");//您的邮箱密码
mailInfo.setFromAddress("han2000lei@163.com");
mailInfo.setToAddress("han2000lei@163.com");
mailInfo.setSubject("设置邮箱标题 如http://www.guihua.org 中国桂花网");
mailInfo.setContent("设置邮箱内容 如http://www.guihua.org 中国桂花网 是中国最大桂花网站==");
//这个类主要来发送邮件
SimpleMailSender sms= new SimpleMailSender();
sms.sendTextMail(mailInfo);//发送文体格式
sms.sendHtmlMail(mailInfo);//发送html格式
}
//这个类主要是设置邮件
MailSenderInfo mailInfo= new MailSenderInfo();
mailInfo.setMailServerHost("smtp.163.com");
mailInfo.setMailServerPort("25");
mailInfo.setValidate(true);
mailInfo.setUserName("han2000lei@163.com");
mailInfo.setPassword("**********");//您的邮箱密码
mailInfo.setFromAddress("han2000lei@163.com");
mailInfo.setToAddress("han2000lei@163.com");
mailInfo.setSubject("设置邮箱标题 如http://www.guihua.org 中国桂花网");
mailInfo.setContent("设置邮箱内容 如http://www.guihua.org 中国桂花网 是中国最大桂花网站==");
//这个类主要来发送邮件
SimpleMailSender sms= new SimpleMailSender();
sms.sendTextMail(mailInfo);//发送文体格式
sms.sendHtmlMail(mailInfo);//发送html格式
}
- 使用上面三个类的代码
- 代码中有时候类和方法上面带[]的是什么意思
- gitHub上面photoBrowser的使用
- Page_Load上面的代码使用——ViewState,Session,Static,Linq
- THinkPHP上面关于图片上传类的使用
- 使用类求出三个长方体的体积
- File类使用的三个案例
- VBA的三个代码口袋
- 【Git】使用Git在git.oschina上面管理代码
- Android上面的百度地图使用步骤
- Android上面的百度地图使用步骤
- smartSvn在Mac上面的使用
- Android上面的百度地图使用步骤
- FragmentTabHost的使用(上面切换)
- Mac 上面使用cocoapods的一些问题
- sqlldr使用的三个例子
- MathType的三个使用技巧
- jQuery的三个使用技巧
- 从零开始,学习windows编程(8)--自己动手,编译CRT
- Graph Drawing算法书籍
- 使用UserLock实现工作站登陆限制
- 关于iPhone/iPad全屏截图与区域截图的几种方法总结
- GDB嵌入式调试(以st7162平台为例)
- 使用上面三个类的代码
- Linux内核 RPS/RFS功能详细测试分析
- IOS控件--UITabBarController
- Early Z Rejection
- TimesTen内存数据库问题总结
- sublimetext2出现问题重装后还是有问题
- 在用户需求中找到真正的创新(发人深省啊)
- activity 生命周期
- 沃信科技ERP系统容灾方案概述