2013 年度本科生毕业设计
基于 JSP 的邮件收发系统的实现与设计
学
专
年
院:
业:
级:
学生姓名:
学
号:
电子信息工程学院
网络工程专业
2009 级
徐美琪
09240048
导师及职称:
张运波(副教授)
2013 年 1 月
2013 Annual Graduation Thesis (Project) of the College Undergraduate
Based on the JSP mailing system
design and implementation
Department: College
of Electronic
and
Information
Engineering
Major: Network Engineering
Grade: 2009
Student’s Name:xu meiqi
Student No.: 09240048
Tutor: zhangyunbo
Finished by January, 2013
2
毕业论文(设计)原创性声明
本人所呈交的毕业论文(设计)是我在导师的指导下进行的研究工
作及取得的研究成果。据我所知,除文中已经注明引用的内容外,本论
文(设计)不包含其他个人已经发表或撰写过的研究成果。对本论文(设
计)的研究做出重要贡献的个人和集体,均已在文中作了明确说明并表
示谢意。
作者签名:
日期:
毕业论文(设计)授权使用说明
本论文(设计)作者完全了解琼州学院有关保留、使用毕业论文(设
计)的规定,学校有权保留论文(设计)并向相关部门送交论文(设计)
的电子版和纸质版。有权将论文(设计)用于非赢利目的的少量复制并
允许论文(设计)进入学校图书馆被查阅。学校可以公布论文(设计)
的全部或部分内容。保密的论文(设计)在解密后适用本规定。
作者签名:
指导教师签名:
日期:
日期:
3
毕业论文(设计)答辩委员会(答辩小组)成员名单
姓名
职称
单位
备注
主席(组长)
4
琼州学院本科毕业论文(设计)
摘 要
随着 Internet 的迅速发展和普及,网络已经成为人们获取交换信息的重要方式,
给人们带来了极大的便利。在各种网络服务中,电子邮件系统以其方便、快捷的特点
成为人们进行信息交流的理想工具。通过电子邮件人们可以以十分低廉的价格,如现
在普遍使用的免费电子邮件,以非常快的速度同世界上其他互联网用户联络。从某种
程度上来说,电子邮件已经基本取代了传统的邮局通信方式。电子邮件的使用者数量
呈几何级数增长。现在,除了一些必须通过传统的方式进行邮寄的邮件外,一般的日
常交流都可以通过电子邮件的形式来进行。
本文采用了软件工程学方法实现了一个简易电子邮件接收系统的设计与开发,本
系统简单地实现邮件的基本功能,包括邮件的接收,发送,读取。可以发送附件等,
能对邮件列表进行管理的文件夹,可以进行添加,删除,修改联系人的地址簿。重点
着重从客户端和用户界面的开发方面详细阐述了整个电子邮件接收实现的全过程。对
开发过程中的难点进行了分析和研究,并通过系统结构图,功能模块图,等方式形象
地描述出来,所实现的客户端界面应当是友好美观与易用。
关键词:JSP;JAVAMAIL;TOMCAT;pop3
琼州学院本科毕业论文(设计)
ABSTRACT
With the rapid development of Internet and the popularization, the network has become
an important way of exchange information, has brought people great convenience. In all
kinds of network service, electronic mail system with its convenient, quick characteristic
become people information communication ideal tool. Through the email people can very
cheap price, such as now commonly used free email, with a very fast speed in the world
with other Internet users contact. To some extent, email has basically been replaced the
traditional post office communication mode. E-mail users quantity is geometric progression
growth. Now, in addition to some must be through the traditional way by mail outside,
general daily communication can through the email form
This paper adopted the software engineering method is a simple email receiving system
design and development, the system simply realize the basic function of mail, including
mail receiving, sending, read. Can send accessories, etc., to mailing list management folder,
can add, delete, modify contact address book. Key emphatically from the client and user
interface development aspects elaborated the whole email receiving the whole process of
realization. To the difficulty in the development process are analyzed and studied, and
through the system structure, function module chart, etc, to describe the image out of the
realization of client interface should be friendly, beautiful and easy to use
Key words:JAVAMAIL
JSP
J2EE TOMCAT
6
琼州学院本科毕业论文(设计)
目 录
1.1.1
1.1.2
第一章 引言.......................................................................................................................... 1
第二章 可行性分析.............................................................................................................. 1
2.1 JSP 技术语法介绍...................................................................................................................................1
JSP 是什么.......................................................................................................................................1
JSP 技术的特点...............................................................................................................................1
2.2 JSP 与 JAVA..............................................................................................................................................3
第三章 动态网页技术的发展趋势与前景分析.................................................................. 3
3.1 常见动态网页技术 .................................................................................................................................. 3
JSP、ASP、PHP 与ASP.NET ...........................................................................................................3
3.1.1
JSP ....................................................................................................................................................4
3.1.2
3.1.4
PHP ................................................................................................................................................. 7
3.1.5 ASP.NET ........................................................................................................................................... 7
3.2 发展趋势与前景分析 .............................................................................................................................. 8
第四章 电子邮件系统设计的相关原理.............................................................................. 8
4.1 系统概述...................................................................................................................................................8
4.2 电子邮件相关协议及其 JAVA 解决........................................................................................................9
4.3 字符编码及字符集转换问题 ................................................................................................................ 10
第五章 使用 JSP 开发邮件系统.........................................................................................11
5.1 搭建开发环境........................................................................................................................................ 11
5.1.1 该系统运行环境...........................................................................................................................11
5.1.2 安装和配置JDK............................................................................................................................12
5.1.3 安装和配置Tomcat......................................................................................................................13
5.1.4 测试是否安装配置成功...............................................................................................................14
5.2 JAVAMAIL 简介........................................................................................................................................15
5.2.1 安装...............................................................................................................................................15
5.2.2 使用Java 2 企业版.......................................................................................................................16
5.3 使用 JSP 发送邮件................................................................................................................................33
5.3.1
E-MAIL 常识..................................................................................................................................33
5.3.2 发送普通文本格式的E-MAIL .................................................................................................... 35
5.3.3 发送带附件的E-MAIL .................................................................................................................... 36
5.4 使用 JSP 接收 E-MAIL...........................................................................................................................37
5.4.1 显示所有E-MAIL 列表................................................................................................................. 37
5.4.2 接收普通文本格式的E-MAIL ...................................................................................................... 41
5.4.3 收带附件的E-MAIL ...................................................................................................................... 46
第六章 电子邮件系统的使用说明................................................................................ 53
附录:JSP 程序原代码...........................................................................................................I
参考文献................................................................................................................................X
7
琼州学院本科毕业论文(设计)
致 谢.....................................................................................................................................XI
8