摘 要 作为一种通过网络实现相互传送和接收信息的现代化通信方式,电子邮件已成为人们日常生活及工作进行信息交换的重要载体,是目前Internet上最常用的功能之一。 本论文是基于JavaMail的简易电子邮件系统的实现;系统分析中给出了电子邮件服务器和电子邮件客户端的简介,同时给出了本次试验中客户端的主要功能和总体框图。 本系统以Java语言作为系统开发的基础语言,以SUN公司提供的JavaMail API标准开发包中的接口,作为java应用程序进行收发电子邮件的公共接口,使用常用的SMTP简单邮件传输协议和POP3邮局协议,实现了包括用户登录、邮件发送、邮件接收、邮件处理以及联系人管理在内的邮件系统的基本功能。并通过逐步测试,满足了普通用户对电子邮件系统的简单需求。
关键词:JavaMail;邮件收发协议;邮件服务器;电子邮件系统 Abstract As a modern means of communication with each other to send and receive information through the network and people's daily life and work, e-mail has become an important carrier of information exchange as one of the most commonly used functions on the Internet. This paper is based on the realization of the the JavaMail simple e-mail system; system analysis given in the Introduction of the e-mail server and e-mail client, and gives the main features and the overall block diagram of the test client. This system use the Java language as the language of the system developed ,using the interface provided by the SUN JavaMail API standard development package ,as a java application to send and receive e-mails public interface , and using the common SMTP Simple Mail Transfer Protocol and POP3 Post Office Protocol , to realize including user login, mail, mail receiving, mail handling and contact management ,as the basic functions of the mail system. By gradually testing to meet the simple needs of ordinary users of the e-mail system. Keywords: the JavaMail; mail sending and receiving protocol; mail server ; e-mail system
第1章 绪 论 1.1概述 电子邮件(简称E-mail)又称电子信箱、电子邮政,它是一种用电子手段提供信息交换的通信方式。正是由于电子邮件具有收费低廉、使用简易、投递迅速、易于保存、全球畅通无阻等优于传统邮件的特性,使得它成为Internet上最广泛的应用之一,它使人们的交流方式得到了极大的改变。另外,电子邮件还可以进行一对多的邮件传递,同一邮件可以一次发送给许多人。极大地满足了大量存在的人与人之间通信的需求。 电子邮件通信属异步通信,所谓异步通信是指:收发双方不必同时在场,发送和接收的邮件暂时存贮在电子邮箱中,用户可以根据需要,适时地进行邮件的发送和查收,这种非实时的通信方式,也正是电子邮件系统的核心。 1.2开发意义及国内现状 电子邮件E-mail是Internet最基本的和最重要的服务之一。据统计,Internet上百分之三十以上的业务量是电子邮件。由于我国的通信基础设施较差,网络速度较慢,因而,与Internet其它功能如WWW、FTP、NEWS等相比,电子邮件服务具有更大的实用性。《CINNIC中国互联网网络发展状况统计报告》中指出。71.65%的中国用户最常用的网络服务就是电子邮件,这个比例远远高于搜索引擎(50.40%)和软件上传或下载服务(44.16%)等其他服务。 1.3系统特点 本系统分析中给出了电子邮件服务器和电子邮件客户端的简介,同时给出了本次试验中客户端的主要功能和总体框图。邮件服务器按照提供的服务类型,可以分为发送邮件服务器(简称发送服务器)和接收邮件服务器(简称接收服务器)。发送邮件服务器使用邮件发送协议,现在常用的是SMTP,所以通常发送邮件服务器也称为SMTP服务器;接收邮件服务器使用邮件接收协议,常用的有POP3和IMAP协议,所以通常接收邮件服务器也称为POP3服务器或IMAP服务器。 SMTP ( Simple Mail Transfer Protocol ),即简单邮件传输协议,是Internet传送E-mail的基本协议,也是TCP/IP协议组的成员。SMTP协议解决邮件系统如何通过一条链路,把邮件从一台机器传送到另一台机器上的问题。SMTP协议的特点是具有良好的可伸缩性,这也是它成功的关键。SMTP协议由于非常简单,又同时适用于广域网和局域网,使它得到了广泛的运用,Internet上能够发送邮件的服务器几乎都支持SMTP协议。 POP3 (Post Office Protocol 3),即邮局协议第三版,是Internet接收邮件的基本协议,也是TCP/IP协议组的成员。RFC1939描述了POP3协议,网址为“http://www.ietf.org/rfc/rfc1939.txt”。 POP3既允许接收邮件服务器向邮件用户发送邮件,也可以接收来自SMTP服务器的邮件。邮件客户端软件会与POP3服务器交互,下载由POP3服务器接收到的邮件。基于POP3协议的邮件系统能提供快速、经济和方便的邮件接收服务,深受用户的青睐。
|