首页 | 本学科首页   官方微博 | 高级检索  
     检索      

利用Spring发送电子邮件的方法研究
引用本文:丁振凡.利用Spring发送电子邮件的方法研究[J].铁道师院学报,2014(1):62-66.
作者姓名:丁振凡
作者单位:华东交通大学信息工程学院,江西南昌330013
摘    要:Spring 框架在 JavaMail 的基础上对发送邮件进行了很好的支持,Spring mail 包中定义了 MailMessage 和MailSender 两个接口来描述了邮件消息和发送者。分析了 MailMessage 接口的具体实现类 SimpleMailMessage 和MimeMailMessage的应用特点,详细介绍了用MimeMessageHelper类进行邮件附件的消息设置过程。结合实例讨论了用JavaMailSenderImpl 类实现与邮件服务器的连接设置及邮件发送方法,最后,给出了发送各类邮件的实现方法。

关 键 词:Spring  邮件发送  MailMessage接口  MailSender接口  附件处理

Email sending methods under Spring framework
DING Zhenfan.Email sending methods under Spring framework[J].Journal of Suzhou Railway Teachers College(Natural Science Edition),2014(1):62-66.
Authors:DING Zhenfan
Institution:DING Zhenfan (School of Information Engineering, East China Jiaotong University, Nanchang 330013, China)
Abstract:Based on JavaMail,Spring framework provides good support for email sending. In Spring mail pack-age, the MailMessage and MailSender interfaces are defined to describe a mail message and sender. This paper has analyzed the application characteristics of SimpleMailMessage and MimeMailMessage ,the MailMessage inter-face implementation classes,and discussed detailedly the use of MimeMessageHelper class in mail attachment message setting process. It has also explored the usage of JavaMailSenderImpl in the realization of connection settings with email server and email transmitting method. Finally ,it gives the realization methods for sending all types of emails.
Keywords:Spring  email sending  MailMessage interface  MailSender interface  attachment process
本文献已被 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号