phil. tax

Technical Manual Step1 INTRODUCTION: The main aim of this project was to develop a fully functional mail client using JavaMail. The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. JavaMail allows for manipulation of the main functions associated with a mail client i.e. sending receiving mail. The idea behind this project is to provide a user with a mail application that is similar to that of Microsoft Outlook. A user can setup their own account to access their mail. SETUP: The first step in developing a mail application is to install the following components on their computer. · JavaMail. · JavaBeans Activation Framework. To install JAF, open the download with WINZIP and extract all files with folder names to the root directory of some drive. Ditto for JavaMail. Then make sure jaf-1.0.2activation.jar and javamail-1.3mail.jar are explicitly mentioned in your classpath, (not just in a classpath directory!). There are two main Jar files that need to be included in order to allow a developer to use the classes that are imported in the programs. The classpaths can be saved in a batch file. To activate the batch file, you run a command on the command prompt, e.g. H:mail.bat H: set classpath=H:javamail-1.1.3mail.jar; H:javamail-1.1.3pop3.jar; H:jaf-1.0.2activation.jar;. The Sun Tutorial is the best way to get started, since it explains how all the classes fit together. The API docs give a lot of detail, but nothing on how it all fits together. Another way to understand it is to look at the demo examples, particularly msgsend.java to send and msgshow.java to receive. The jar files contain the necessary protocols needed to send and receive. PROTOCOLS: POP3 API: POP3 and its predecessors are designed to allow end users with intermittent connections such as dial-up connections to retrieve email when connected, and then to view and manipulate the retrieved messages without needing to stay connected. Although most clients have an option to leave mail on server, email clients using POP3 generally connect, retrieve all messages, store them on the user's PC as new messages, delete them from the server, and then disconnect. IMAP API: IMAP stands for Internet Message Access Protocol. It is a method of accessing electronic mail or bulletin board messages that are kept on a (possibly shared) mail server. In other words, it permits a "client" email program to access remote message stores as if they were local. For example, email stored on an IMAP server can be manipulated from a desktop computer at home, a workstation at the office, and a notebook computer while travelling, without the need to transfer messages or files back and forth between these computers. IMAP's ability to access messages (both new and saved) from more than one computer has become extremely important as reliance on electronic messaging and use of multiple computers increases. SMTP API: SMTP is a relatively simple, text-based protocol, where one or more recipients of a message are specified (and in most cases verified to exist) and then the message text is transferred. It is quite easy to test a SMTP server using the msgsend.java program. MIME API MIME stands for Multipurpose Internet Mail Extensions. MIME is an additional feature of the SMTP protocol. It defines messages that contain attachments. The MIME protocol parses a messages content and sends the message with the SMTP protocol. The MIME protocol is only used when messages have multiple parts. JAVAMAIL CLASSES: SESSION The session class defines a basic mail session. Once a session is opened everything works through it, without you can do nothing. The Session object gets information relating to the server and other fields needed to establish a connection through the java.util.properties object. This information can then be shared across the entire application. In this case you call, Session.getDefaultInstance(props,null) ; //props holds relevant information. If you want to set up an entirely new session you call, Session.getInstance(props,null);//null is the authenticater. In most cases, it is sufficient to use the shared session, even if working with mail sessions for multiple user mailboxes. You can add the username and password combination in at a later step in the communication process, keeping everything separate. MESSAGES Once you have a session, create a message. The message is created with the message object. Message is an abstract class. Being an abstract class, you must work with a subclass, in most cases javax.mail.internet.MimeMessage. A MimeMessage is an email message that understands MIME types and headers, as defined in the different RFCs.

Essay Information


Words: 298
Pages: 1.2
Rating: None

All Papers Are For Research And Reference Purposes Only. You must cite our web site as your source.