|
Since I have written several articles on JavaMail for on developer.com ( WebMail in Java and Java meets e-mail), I have received many requests for more information. This article is a compilation of the most popular questions. This article follows an exchange of emails with reader Daniel Dekanski. Daniel had a simple question: “how to find new emails in a POP3 mailbox with JavaMail?” He had noticed that his regular email client was significantly faster than JavaMail. I recommend that you also study the other lessons in my extensive collection of online Java tutorials. You will find those lessons published at Gamelan.com. However, as of the date of this writing, Gamelan doesn't maintain a consolidated index of my Java tutorial lessons, and sometimes they are difficult to locate there. You will find a consolidated index at www.DickBaldwin.com. Richard has participated in numerous consulting projects, and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's Programming Tutorials, which has gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine. Copyright 2005, Richard G. Baldwin. Reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited. Although I am using the program to consolidate Email messages from several different POP3 servers onto the Gmail server, it should also be useful for collecting Email messages from any group of POP3 servers and forwarding those messages to any other Email accounts In this article and the previous one, I present a Web-based e-mail client. It is similar to Hotmail, allowing you to check e-mail over the Internet. The client consists of two servlets (one for sending e-mail in the previous article and one for reading e-mail in this one) that use JavaMail to communicate with the e-mail system. In this article and the next one, I'll present a Web-based e-mail client. It is similar to Hotmail, allowing you to check e-mail over the Web. The client consists of two servlets (one for sending e-mails in this article and one for reading e-mails in the next article) that use JavaMail to communicate with the e-mail system. In December 1997, I wrote an article called How to send an e-mail from Java. Sun had just announced the JavaMail API, but it was not publicly available, so I had to "roll my own" code. Let me offer a much-needed update. The first problem is that over the years, I have accumulated several different Email accounts. Unfortunately, a couple of the most important accounts (including my employer) refuse to forward my Email messages to Gmail, (or to any other Email account, for that matter). I addressed that problem in an earlier lesson entitled Consolidating Email using Java. In that lesson, I provided a Java program that can be used to fetch messages from such uncooperative Email accounts and to forward those messages to Gmail (or any other Email account). Although it would be interesting to explore the creation of a Java-based WWW browser (and those classes) in this article, I will not do that because my goal is to explore electronic mail (email). Specifically, I plan to introduce you to the anatomy of an email message and then show you how to use the Network API to develop programs that send and receive email messages. In this and the previous lesson, I am showing you how to write a Java program that supplements the SPAM screening software that you are currently using. This program is used to identify and remove SPAM from your Email server before it is downloaded into your primary Email client. Previous article: Enlisting Java in the War Against SPAM: The Screening Module Next article: Enlisting Java in the War Against SPAM: Training the Subject Line Screener I encourage you to copy the code from Listing 30 below, as well as the program named Pop302 and the three starter text files at the end of the previous lesson entitled Enlisting Java in the War Against SPAM, Part 2, The Screening Module. (The program named Pop302 is in Listing 34 in the previous lesson.) I encourage you to copy the code from Listing 10 below, as well as the programs and starter text files at the ends of the lessons entitled Enlisting Java in the War Against SPAM: The Communications Module, Enlisting Java in the War Against SPAM: The Screening Module, and Enlisting Java in the War Against SPAM: Training the Subject Line Screener. |
w_w___w___.j_a___v_a___2_s.c___o___m_ | Contact Us |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |