Õª Òª
×÷ΪһÖÖͨ¹ýÍøÂçʵÏÖÏ໥´«ËͺͽÓÊÕÐÅÏ¢µÄÏÖ´ú»¯Í¨ÐÅ·½Ê½£¬µç×ÓÓʼþÒѳÉΪÈËÃÇÈÕ³£Éú»î¼°¹¤×÷½øÐÐÐÅÏ¢½»»»µÄÖØÒªÔØÌ壬ÊÇÄ¿Ç°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ÉÏ×î¹ã·ºµÄÓ¦ÓÃÖ®Ò»£¬ËüʹÈËÃǵĽ»Á÷·½Ê½µÃµ½Á˼«´óµÄ¸Ä±ä¡£ÁíÍ⣬µç×ÓÓʼþ»¹¿ÉÒÔ½øÐÐÒ»¶Ô¶àµÄÓʼþ´«µÝ£¬Í¬Ò»Óʼþ¿ÉÒÔÒ»´Î·¢Ë͸øÐí¶àÈË¡£¼«´óµØÂú×ãÁË´óÁ¿´æÔÚµÄÈËÓëÈËÖ®¼äͨÐŵÄÐèÇó¡£
µç×ÓÓʼþͨÐÅÊôÒ첽ͨÐÅ£¬ËùνÒ첽ͨÐÅÊÇÖ¸£ºÊÕ·¢Ë«·½²»±ØͬʱÔÚ³¡£¬·¢ËͺͽÓÊÕµÄÓʼþÔÝʱ´æÖüÔÚµç×ÓÓÊÏäÖУ¬Óû§¿ÉÒÔ¸ù¾ÝÐèÒª£¬ÊÊʱµØ½øÐÐÓʼþµÄ·¢ËͺͲéÊÕ£¬ÕâÖÖ·ÇʵʱµÄͨÐÅ·½Ê½£¬Ò²ÕýÊǵç×ÓÓʼþϵͳµÄºËÐÄ¡£