gags documentation
TRANSCRIPT
-
8/2/2019 GAGS Documentation
1/54
Web Based Messaging
&
Tools
Developed & Designed by:
Naresh Mallya
Siya Sardesai
Bablukumar Singh
-
8/2/2019 GAGS Documentation
2/54
TITLE PAGE
GAGS Web based Messaging & Tools
By,
Naresh Mallya
Siya Sardesai
Bablukumar Singh
T.Y.B.Sc.
(Computer Science)
2009-2010
Under the guidance of Mr. Govind Kelkar
Government College of Arts, Science & CommerceKhandola, Marcela Goa.
-
8/2/2019 GAGS Documentation
3/54
Certificate
This is to certify that the project entitled
GAGS WEB BASED MESSAGING & TOOLS
which is a Web based mail client software, to send and receive
emails with other features is completed by the candidate
themselves during the period of study under my guidance
& they have worked sincerely & developed
an efficient and a reliable system.
__________________________ ____________________________
Mr. Govind Kelkar Mrs. Sujata Gaonkar
Project Guide Head of Department
(Computer Science)
__________________________ ____________________________
Dr. Seema Rath External Examiner
Principal
-
8/2/2019 GAGS Documentation
4/54
DECLARATION
We declare that this Project Report entitled
GAGS Web based Messaging & Tools
has been composed by us and it has not previously
formed the basis for the award
of
any Diploma or other similar titles
Class
T.Y. B.Sc.
(Computer Science)
NAME ROLL NO. SIGNNaresh Mallya 390Siya Sardesai 396
Bablukumar Singh 398
-
8/2/2019 GAGS Documentation
5/54
Acknowledgement
Expressing acknowledgement is quite a difficult task and it isimpossible to do justice to all.
First of all, we would like to thank the almighty without whomnothing is possible.
We would like to express our deep sense of gratitude to ourproject guide Mr. Govind Kelkar for his constant support, concernand invaluable guidance without which this project would have
been impossible
We would also like to express our gratitude towards Ms. SujataGaonkar (Head of Department), Ms. Anita Raicar and Ms. Gracy
Fernandes (Lecturers) for all that they have done to us in whatever
way possible.
Our heartfelt thanks also to our officiating principal Mrs. SeemaRath for letting us use the laboratory to our advantage.
We are thankful to our Lab Attendant Mr. Mario Gonsalves, our labassistant Mr. Tulshidas Kunkalekar for allowing us to use the
laboratory even after college hours & during holidays thus allowingus to complete the project work on time.
We whole-heartedly express our gratitude towards our familymembers for being there for us at all time & patiently supporting &
encouraging us during the course of our project.
A number of people have been generous enough to help us out intimes of Need. We would like to thank them too.
-
8/2/2019 GAGS Documentation
6/54
INDEX
Introduction to E-mail
1
Problem Definition
2
Proposed System
3
Introduction to softwares used
HTML
JavaScript
Java
Java Server Pages
MySql Server
Netbeans Apache Tomcat
Apache JAMES Server
JavaMail API
System requirements
System Configuration
Installing & Configuring JAMES mail Server
Installing JAVAMail
Software Implementation
Design
General Block Diagram
Architecture Diagram
Tree Diagram
Table Diagram
User Manual
-
8/2/2019 GAGS Documentation
7/54
-
8/2/2019 GAGS Documentation
8/54
Introduction
-
8/2/2019 GAGS Documentation
9/54
E-MAIL
About E-mail:
The conventional mailing by post can take several days to travel across the
country and weeks to go around the world. That is why nowadays it is referred
to as snail mail. In recent times, email or electronic mail is being used to send
receive messages. It saves time & money, is fast, easy to use & less expensive
than post. You can send email practically to anyone with an e-mail address,
anywhere in the world. So what is email? In its simplest form, email is anelectronic message sent from one computer to another. You can send or receive
personal & business-related messages with attachments like pictures or other
documents.
Just as a letter or document stops at different postal stations along its way,
email is passed from one computer to another as it travels along the network.
Each computer reads the email address & routes it to another computer until it
eventually reaches its destination. It is then stored in an electronic mailbox.
With the Internet, this whole process usually takes a few minutes, allowing youto communicate quickly & easily with millions of people around the world
anytime of the day or night, for the cost of a local phone call.
Until recently, email on the Internet was good only for short notes. You couldnt
send attachments like formatted documents or graphics. With the advent of
MIME (Multipurpose Internet Mail Extension) & other types of encoding
schemes, like Uuencode, not only can you send formatted documents, photos,
sounds files, & video files as attachments.
E-mail Messages:
Email messages are a lot like letters. There are two main parts: header & body.
The header contains your name & address & the name & the address of the
person its being to sent to, the name & address of anyone who is being copied,
the date of the message & what the message is about (subject). Just like with
regular mail you need the correct address. If you use a wrong address or
mistype it, your message will get bounced back to you. When you receive an
email form someone, the header tells you where it came from, what is it about,
how it was sent, & when. It acts like an electronic postmark.
-
8/2/2019 GAGS Documentation
10/54
Problem Definition
Nowadays, Email is a very important source of communication, through which
we can send electronic messages from one computer to another. Even if it is at
a very far distance. The only requirement you need to be close is a Computer
and an internet connection.
The email system generally consists of a client side and server side.
The client is usually a browser and the server side is a web server with the
application.
For a web based mail client, the user should be able to send and receive
personal and business related messages with attachments like pictures, sound
files or other documents. He/She should be able to organize messages in
different folders. He/She can maintain the contact list. He/She can save the
mail as draft. He/She can delete the checked mails. He/She should be able to
download the attachments. We can also provide some additional features such
as an online calculator, chat facility etc.
Our aim in this project is to create an email client that can incorporate all these
facilities & tools.
-
8/2/2019 GAGS Documentation
11/54
Proposed System
The users may require to send data as text messages, in ASCII format, or as
audio & video clips. The users might also want to attach file or documents along
with the message. The user requires to delete checked mails. The users should
be able to use this system in a network, that is, send data over the Intranet or
to geographically distant locations by means of the Internet. User might also
want to use other facilities such as chat, calculator, astrology, etc.
Once the user is authenticated then he/she has the option to view the mail
received, receive & download attachments, compose & send mails along with
attachments. These attachments can be in the form of executable files,
pictures, audio & video files or simple text files. The users can delete checked
mails from their inbox . The user is also provided facility to delete all mails.
The user can change details of their account, such as password to the account,
which was previously entered at the time of registration. The users may require
to carry out a quick calculation, hence for convenience the users have to be
provided with an online calculator.
-
8/2/2019 GAGS Documentation
12/54
Introduction to
Softwares used
-
8/2/2019 GAGS Documentation
13/54
-
8/2/2019 GAGS Documentation
14/54
JAVASCRIPT
Introduction:
JavaScript is an object-oriented scripting language used toenable programmatic access to objects within both the client application andother applications. It is primarily used in the form ofclient-side JavaScript,implemented as an integrated component of the web browser, allowing thedevelopment of enhanced user interfaces and dynamic websites. JavaScript isa dialect of the ECMAScript standard and is characterized as a dynamic, weaklytyped, prototype-based language with first-class functions. JavaScript was
influenced by many languages and was designed to look like Java, but to beeasier for non-programmers to work with.
Use in Web pages:
The primary use of JavaScript is to write functions that are embedded in orincluded from HTML pages and interact with the Document Object Model (DOM)of the page. Some simple examples of this usage are:
Opening or popping up a new window with programmatic control over the
size, position, and attributes of the new window (e.g. whether the menus,toolbars, etc. are visible).
Validation ofweb form input values to make sure that they will beaccepted before they are submitted to the server.
Changing images as the mouse cursor moves over them: This effect isoften used to draw the user's attention to important links displayed asgraphical elements.
Because JavaScript code can run locally in a user's browser (rather than on aremote server) it can respond to user actions quickly, making an applicationfeel more responsive. Furthermore, JavaScript code can detect user actionswhich HTML alone cannot, such as individual keystrokes. Applications suchas Gmail take advantage of this: much of the user-interface logic is written inJavaScript, and JavaScript dispatches requests for information (such as thecontent of an e-mail message) to the server. A web browser is by far the mostcommon host environment for JavaScript. Web browsers typically use thepublic API to create "host objects" responsible for reflecting the DOM intoJavaScript. A JavaScript webserver would expose host objects representingan HTTP request and response objects, which a JavaScript program could thenmanipulate to dynamically generate web pages.
http://en.wikipedia.org/wiki/Object-orientedhttp://en.wikipedia.org/wiki/Scripting_languagehttp://en.wikipedia.org/wiki/Computer_programminghttp://en.wikipedia.org/wiki/Client_(computing)http://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/Client-side_JavaScripthttp://en.wikipedia.org/wiki/Web_browserhttp://en.wikipedia.org/wiki/User_interfacehttp://en.wikipedia.org/wiki/Websitehttp://en.wikipedia.org/wiki/Programming_language_dialecthttp://en.wikipedia.org/wiki/ECMAScripthttp://en.wikipedia.org/wiki/Dynamic_languagehttp://en.wikipedia.org/wiki/Weak_typinghttp://en.wikipedia.org/wiki/Weak_typinghttp://en.wikipedia.org/wiki/Prototype-based_programminghttp://en.wikipedia.org/wiki/First-class_functionhttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/HTMLhttp://en.wikipedia.org/wiki/Document_Object_Modelhttp://en.wikipedia.org/wiki/Pop-up_adhttp://en.wikipedia.org/wiki/Validationhttp://en.wikipedia.org/wiki/Form_(web)http://en.wikipedia.org/wiki/Rollover_(web_design)http://en.wikipedia.org/wiki/Gmailhttp://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/Document_Object_Modelhttp://en.wikipedia.org/wiki/Server-side_JavaScripthttp://en.wikipedia.org/wiki/HTTPhttp://en.wikipedia.org/wiki/Object-orientedhttp://en.wikipedia.org/wiki/Scripting_languagehttp://en.wikipedia.org/wiki/Computer_programminghttp://en.wikipedia.org/wiki/Client_(computing)http://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/Client-side_JavaScripthttp://en.wikipedia.org/wiki/Web_browserhttp://en.wikipedia.org/wiki/User_interfacehttp://en.wikipedia.org/wiki/Websitehttp://en.wikipedia.org/wiki/Programming_language_dialecthttp://en.wikipedia.org/wiki/ECMAScripthttp://en.wikipedia.org/wiki/Dynamic_languagehttp://en.wikipedia.org/wiki/Weak_typinghttp://en.wikipedia.org/wiki/Weak_typinghttp://en.wikipedia.org/wiki/Prototype-based_programminghttp://en.wikipedia.org/wiki/First-class_functionhttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/HTMLhttp://en.wikipedia.org/wiki/Document_Object_Modelhttp://en.wikipedia.org/wiki/Pop-up_adhttp://en.wikipedia.org/wiki/Validationhttp://en.wikipedia.org/wiki/Form_(web)http://en.wikipedia.org/wiki/Rollover_(web_design)http://en.wikipedia.org/wiki/Gmailhttp://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/Document_Object_Modelhttp://en.wikipedia.org/wiki/Server-side_JavaScripthttp://en.wikipedia.org/wiki/HTTP -
8/2/2019 GAGS Documentation
15/54
JAVA
Introduction:
Java is a powerful programming language originally developed by JamesGosling at Sun Microsystems and released in 1995 as a core component of SunMicrosystems Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-levelfacilities. Java applications are typically compiled to bytecode (class file) thatcan run on any Java Virtual Machine (JVM) regardless ofcomputer architecture.Java is general-purpose, concurrent, class-based, and object-oriented, and isspecifically designed to have as few implementation dependencies as possible.
It is intended to let application developers "write once, run anywhere".
Java Platform:
One characteristic of Java is portability, which means that computer programswritten in the Java language must run similarly on any supportedhardware/operating-system platform. This is achieved by compiling theJava language code to an intermediate representation calledJava
bytecode, instead of directly to platform-specificmachine code. Javabytecode instructions are analogous to machine code, but are intended tobeinterpretedby avirtual machine(VM) written specifically for thehost hardware.End-userscommonly use a Java Runtime Environment(JRE) installed on their own machine for standalone Java applications, orin a Web browser for Javaapplets. The Java applet API is a frameworkthat allows Java-enabled Web browsers to manage and display embeddedJava applications within.
Syntax:
The syntax of Java is largely derived from C++. Unlike C++, which combines
the syntax for structured, generic, and object-oriented programming, Java was
built almost exclusively as an object oriented language. All code is written
inside a class and everything is an object, with the exception of the intrinsic
data types (ordinal and real numbers, Boolean values, and characters), which
are not classes for performance reasons.
http://en.wikipedia.org/wiki/Programming_languagehttp://en.wikipedia.org/wiki/James_Goslinghttp://en.wikipedia.org/wiki/James_Goslinghttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Java_(software_platform)http://en.wikipedia.org/wiki/Syntax_(programming_languages)http://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/C%2B%2Bhttp://en.wikipedia.org/wiki/Object_modelhttp://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Java_bytecodehttp://en.wikipedia.org/wiki/Class_(file_format)http://en.wikipedia.org/wiki/Java_Virtual_Machinehttp://en.wikipedia.org/wiki/Computer_architecturehttp://en.wikipedia.org/wiki/Java_bytecodehttp://en.wikipedia.org/wiki/Java_bytecodehttp://en.wikipedia.org/wiki/Machine_codehttp://en.wikipedia.org/wiki/Interpreter_(computing)http://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/End-userhttp://en.wikipedia.org/wiki/C%2B%2Bhttp://en.wikipedia.org/wiki/Programming_languagehttp://en.wikipedia.org/wiki/James_Goslinghttp://en.wikipedia.org/wiki/James_Goslinghttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Java_(software_platform)http://en.wikipedia.org/wiki/Syntax_(programming_languages)http://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/C%2B%2Bhttp://en.wikipedia.org/wiki/Object_modelhttp://en.wikipedia.org/wiki/Compilerhttp://en.wikipedia.org/wiki/Java_bytecodehttp://en.wikipedia.org/wiki/Class_(file_format)http://en.wikipedia.org/wiki/Java_Virtual_Machinehttp://en.wikipedia.org/wiki/Computer_architecturehttp://en.wikipedia.org/wiki/Java_bytecodehttp://en.wikipedia.org/wiki/Java_bytecodehttp://en.wikipedia.org/wiki/Machine_codehttp://en.wikipedia.org/wiki/Interpreter_(computing)http://en.wikipedia.org/wiki/Virtual_machinehttp://en.wikipedia.org/wiki/End-userhttp://en.wikipedia.org/wiki/C%2B%2B -
8/2/2019 GAGS Documentation
16/54
Java server pages (jsp)
What is JSP?
Java Server Pages (JSPs) are server-side Java EE components that generateresponses, typically HTML pages, to HTTP requests from clients. A JSP Page is atext document that contains two types of text: static data, which can beexpressed in any text-based format (such as HTML, SVG, WML, and XML), andJSP elements, which construct dynamic content. JSPs embed Java code in anHTML page by using the special delimiters . A JSP is compiled to aJava servlet, a Java application in its own right, the first time it is accessed.After that, the generated servlet creates the response.
The following code contains a simple example of a JSP file:
The Components of a JSP
The components that make up Java Server Pages are discussed below:
DirectivesDirectives are JSP elements that provide global information about an entire JSP page.An example would be a directive that indicated the language to be used in compilinga JSP page. The syntax of a directive is as follows:This states that, for this page directive, assign these values for these attributes. Adirective can contain n number of optional attribute/value pairs.
ActionsActions provide an abstraction that can be used to easily encapsulate common tasks.They typically create or act on objects, normally JavaBeans. The JSP technologyprovides some standard actions.
JSP ScriptingJSP scripting is a mechanism for embedding code fragments directly into an HTMLpage. There are three scripting language elements involved in JSP scripting. Each ofthese JSP scripting elements has its appropriate location in the generated servlet.The JSP Scripting elements are explained as below.
http://en.wikipedia.org/wiki/Server-sidehttp://en.wikipedia.org/wiki/HTMLhttp://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Client_(computing)http://www.w3.org/MarkUphttp://www.w3.org/TR/SVGhttp://www.oasis-open.org/cover/wap-wml.htmlhttp://www.w3.org/TR/REC-xmlhttp://en.wikipedia.org/wiki/Delimiterhttp://en.wikipedia.org/wiki/Server-sidehttp://en.wikipedia.org/wiki/HTMLhttp://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Client_(computing)http://www.w3.org/MarkUphttp://www.w3.org/TR/SVGhttp://www.oasis-open.org/cover/wap-wml.htmlhttp://www.w3.org/TR/REC-xmlhttp://en.wikipedia.org/wiki/Delimiter -
8/2/2019 GAGS Documentation
17/54
Declarations : JSP declarations are used to declare variables and methods inthe scripting language used in a JSP page. A JSP declaration should be acomplete declarative statement.The syntax for a JSP declaration is as follows:
A sample variable declaration using this syntax is declared here:A sample method declaration using the same syntax is declared as follows:
Expressions: JSP expressions are elements in a scripting language that areevaluated with the result being converted to a java.lang.String. After the stringis converted, it is written to the current out JspWriter object. JSP expressionsare evaluated at HTTP request-time, with the resulting String being inserted atthe expression's referenced position in the .jsp file. If the resulting expression
cannot be converted to a String, then a translation time error will occur. If theconversion to a String cannot be detected during translation, aClassCastException will be thrown at request-time. The syntax of a JSPexpression is as follows:A code snippet containing a JSP expression is shown here:Hello
Scriptlets: Scriptlets are what bring all the scripting elements together. Theycan contain any coding statements that are valid for the language referencedin the language directive. They are executed at request-time and they can
make use of declarations, expressions, and JavaBeans. The syntax for ascriptlet is as follows:
During the initial request the JSP scripting code is converted to servlet code and thencompiled and loaded into resident memory. The actual source code, which is foundbetween scriptlet tags , is placed into the newly created servlet's
_jspService() method.
What Is a Servlet?
A servletis a Java programming language class that is used to extend thecapabilities of servers that host applications access via a request-responseprogramming model. Although servlets can respond to any type of request,they are commonly used to extend the applications hosted by web servers. Forsuch applications, Java Servlet technology defines HTTP-specific servlet classes.Thejavax.servlet andjavax.servlet.http packages provide interfaces andclasses for writing servlets. All servlets must implement the Servlet interface,which defines life-cycle methods.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/package-summary.htmlhttp://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/package-summary.htmlhttp://java.sun.com/j2ee/1.4/docs/api/javax/servlet/Servlet.htmlhttp://java.sun.com/j2ee/1.4/docs/api/javax/servlet/package-summary.htmlhttp://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/package-summary.htmlhttp://java.sun.com/j2ee/1.4/docs/api/javax/servlet/Servlet.html -
8/2/2019 GAGS Documentation
18/54
MYSQL SERVERWhat is MySQL?
MySQL, the most popular Open Source SQL database management system, is
developed, distributed & supported by MySQL AB. MySQL AB is a commercial
company, founded by the MySQL developers. It is a second generation Open
Source company that unites Open Source values & methodology with a
successful business model.
MySQL is a database management system.
A database is a structured collection of data. To add, access, & process data
stored in a computer database, you need a database management system
such as MySQL Server. Since computers are very good at handling large
amounts of data, database management systems play a central role in
computing, as standalone utilities, or as parts of other applications.
MySQL is a relational database management system.
A relational database stores data in separate tables rather than putting all the
data in one big storeroom. This adds speed & flexibility. The SQL part ofMySQL stands for Structured Query Language. SQL is the most common
standardized language used to access databases & is defined by the ANSI/ISO
SQL Standard.
The SQL standard has been evolving since 1986 & several versions exist.
MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that consists of a
multithreaded SQL server that supports different backends, several different
client programs & libraries, administrative tools, & a wide range of application
programming interfaces(APIs).
MySQL QUERY BROWSER
The MySQL Query Browser is a graphical tool provided by MySQL for creating,
executing & optimizing queries in a graphical environment. The MySQL Query
Browser is designed to help you & analyze data stored within your MySQL Database.
While all queries exceuted in the MySQL Browser could also be performed in the
MySQL command-line utility, the MySQL Browser allows for quering & editing of data
in a more initiative graphical manner.
-
8/2/2019 GAGS Documentation
19/54
Netbeans ide 6.7The NetBeans IDE is an open-source integrated development environment.NetBeans refers to both a platform framework for Java desktop applications, and anintegrated development environment (IDE) for developing with Java, JavaScript,PHP, Python, Ruby, Groovy, C, C++, Scala and Clojure.
The NetBeans IDE is written in Java and runs everywhere where a JVM is installed,including Windows, Mac OS, Linux, and Solaris. A JDK is required for Javadevelopment functionality, but is not required for development in other programminglanguages. NetBeans IDE supports development of all Java application types (Java SEincluding JavaFX, (Java ME, web, EJB and mobile applications) out of the box.
The NetBeans Platform allows applications to be developed from a set of modularsoftware components called modules. Applications based on the NetBeans platform(including the NetBeans IDE) can be extended by third party developers.
APACHE TOMCATApache Tomcat (or Jakarta Tomcat or simply Tomcat) is an open sourceservlet container
developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servletand the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pureJava" HTTPweb server environment for Java code to run. Tomcat should not be confused with
the Apache web server, which is a C implementation of an HTTP web server; these two webservers are not bundled together. Apache Tomcat includes tools for configuration and
management, but can also be configured by editing XML . We are using Apache Tomcat thatis integrated with NetBeans 6.7
Components of Tomcat includes.
Catalina
Catalina is Tomcat's servlet container. Catalina implements Sun Microsystems' specifications
for servlet and JavaServer Pages (JSP). The architect for Catalina was Craig McClanahan.
Coyote
Coyote is Tomcat's HTTP Connector component that supports the HTTP 1.1 protocol for theweb server or application container. Coyote listens for incoming connections on a specific TCP
port on the server and forwards the request to the Tomcat Engine to process the request andsend back a response to the requesting client.
Jasper
Jasper is Tomcat's JSP Engine. Tomcat 5.x uses Jasper 2, which is an implementation of theSun Microsystems's JavaServer Pages 2.0 specification. Jasper parses JSP files to compile
them into Java code as servlets (that can be handled by Catalina). At runtime, Jasper is ableto automatically detect JSP file changes and recompile them.
http://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Platform_(computing)http://en.wikipedia.org/wiki/Integrated_development_environmenthttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/JavaScripthttp://en.wikipedia.org/wiki/PHPhttp://en.wikipedia.org/wiki/Python_(programming_language)http://en.wikipedia.org/wiki/Ruby_(programming_language)http://en.wikipedia.org/wiki/Groovy_(programming_language)http://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/C%2B%2Bhttp://en.wikipedia.org/wiki/Scala_(programming_language)http://en.wikipedia.org/wiki/Clojurehttp://en.wikipedia.org/wiki/Java_Virtual_Machinehttp://en.wikipedia.org/wiki/Java_Development_Kithttp://en.wikipedia.org/wiki/Java_Platform,_Standard_Editionhttp://en.wikipedia.org/w/index.php?title=Java_Platform,_Mobile_Edition&action=edit&redlink=1http://en.wikipedia.org/wiki/Web_applicationhttp://en.wikipedia.org/wiki/EJBhttp://en.wikipedia.org/wiki/MIDlethttp://en.wikipedia.org/wiki/Software_componenthttp://en.wikipedia.org/wiki/Third_party_developerhttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Java_Servlet#Servlet_containershttp://en.wikipedia.org/wiki/Apache_Software_Foundationhttp://en.wikipedia.org/wiki/Java_Servlethttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Web_serverhttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/Apache_HTTP_Serverhttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/Java_Servlet#Servlet_containershttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Java_servlethttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/Craig_McClanahanhttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Platform_(computing)http://en.wikipedia.org/wiki/Integrated_development_environmenthttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/JavaScripthttp://en.wikipedia.org/wiki/PHPhttp://en.wikipedia.org/wiki/Python_(programming_language)http://en.wikipedia.org/wiki/Ruby_(programming_language)http://en.wikipedia.org/wiki/Groovy_(programming_language)http://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/C%2B%2Bhttp://en.wikipedia.org/wiki/Scala_(programming_language)http://en.wikipedia.org/wiki/Clojurehttp://en.wikipedia.org/wiki/Java_Virtual_Machinehttp://en.wikipedia.org/wiki/Java_Development_Kithttp://en.wikipedia.org/wiki/Java_Platform,_Standard_Editionhttp://en.wikipedia.org/w/index.php?title=Java_Platform,_Mobile_Edition&action=edit&redlink=1http://en.wikipedia.org/wiki/Web_applicationhttp://en.wikipedia.org/wiki/EJBhttp://en.wikipedia.org/wiki/MIDlethttp://en.wikipedia.org/wiki/Software_componenthttp://en.wikipedia.org/wiki/Third_party_developerhttp://en.wikipedia.org/wiki/Open_sourcehttp://en.wikipedia.org/wiki/Java_Servlet#Servlet_containershttp://en.wikipedia.org/wiki/Apache_Software_Foundationhttp://en.wikipedia.org/wiki/Java_Servlethttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Web_serverhttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/Apache_HTTP_Serverhttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/Java_Servlet#Servlet_containershttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Java_servlethttp://en.wikipedia.org/wiki/JavaServer_Pageshttp://en.wikipedia.org/wiki/Craig_McClanahanhttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/JavaServer_Pages -
8/2/2019 GAGS Documentation
20/54
APACHE JAMES SERVERThe Java Apache Mail Enterprise Server -- generally referred to asJames-- is a portable, secure, and 100% Pure Java enterprise mail server built by theApache group. But it has the potential to be much more than that, thanks to itspluggable protocol architecture and a mailetinfrastructure that does for e-mailwhat servlets do for Web servers. E-mail servers have been around since theearly days of DARPA funding for what would eventually become the Internet,but James offers new possibilities for what's often been dubbed the Internet'sfirst killer application.
James design objectives
James was designed to accommodate certain objectives. For example, it iswritten entirely in the Java language to maximize portability. It was written tobe secure and provides a number of features that both protect the serverenvironment itself and provide secure services. James functions as amultithreaded application that takes advantage of many of the benefitsavailable in the Avalon framework. (Avalon is an Apache Jakarta project thatfeatures the Phoenix high-performance server infrastructure)
James provides a comprehensive set of services, including many that areusually available only in high-end or well-established e-mail servers. These
services are primarily implemented using the Matcher and Mailet APIs, whichwork together to provide e-mail detection and processing capabilities. Jamessupports the standard e-mail protocols (SMTP, POP3, IMAP), along with a fewothers, using a loosely coupled plug-in design that keeps the messagingframework abstracted from the protocols. This is a powerful idea that mayenable James to act as more of a general messaging server in the future or tosupport alternative messaging protocols such as instant messaging.
The final and most interesting objective delivered by the James design group isthe notion of mailets, which provide a component life cycle and container
solution for developing e-mail applications. To be sure, it's always been possibleto use other MTAs, such as Sendmail, to do this, given that any program can becalled and data piped through executables to do the job, but James provides acommon, simple API for accomplishing these goals and makes the work easy,thanks to the objects available for manipulation.
-
8/2/2019 GAGS Documentation
21/54
JavaMail API
What is the JavaMail API?
The JavaMail API is an optional package (standard extension) for reading,composing, and sending electronic messages. You use the package to createMail User Agent (MUA) type programs, similar to Eudora, pine, and MicrosoftOutlook.The API's main purpose is not for transporting, delivering, and forwarding
messages; this is the purview of applications such as sendmail and other MailTransfer Agent (MTA) type programs. MUA-type programs let users read andwrite e-mail, whereas MUAs rely on MTAs to handle the actual delivery.The JavaMail API is designed to provide protocol-independent access forsending and receiving messages by dividing the API into two parts: The first part of the API is basically, how to send and receive messagesindependent of the provider/protocol. The second part speaks the protocol-specific languages, like SMTP,POP, IMAP, and NNTP. With the JavaMail API, in order to communicate with aserver, you need aproviderfor a protocol.
Protocols used with the API
SMTP
The Simple Mail Transfer Protocol (SMTP) defines the mechanism for delivery ofe-mail. In the context of the JavaMail API, your JavaMail-based program willcommunicate with your company or Internet Service Provider's (ISP's) SMTPserver.
POP
POP stands for Post Office Protocol. POP is the mechanism most people on theInternet use to get their mail. It defines support for a single mailbox for eachuser.
IMAP
IMAP is a more advanced protocol for receiving messages. IMAP stands forInternet Message Access Protocol, and is currently in version 4, also known asIMAP4.
-
8/2/2019 GAGS Documentation
22/54
System
Requirements
-
8/2/2019 GAGS Documentation
23/54
The recommended hardware requirements are as follows:
Intel Pentium(R) D CPU 3.00 Ghz or higher.
512 MB RAM(minimum), 1 GB RAM(recommended)
Minimum of 2 GB, free hard disk space.
Minimum resolution of 800 X 600 pixels
Best viewed at 1024 X 768 pixels.
The recommended software requirement are as follows:
Operating System: Windows XP, Vista, Linux
Web Browser: Internet Explorer 6 or further and compatible
Java Development Kit (JDK 6u1.4 or higher)
NetBeans IDE 6.7
Back End: MySQL Server, Apache JAMES Server
-
8/2/2019 GAGS Documentation
24/54
System
Configuration
-
8/2/2019 GAGS Documentation
25/54
Installing and configuring james mail server
James requires a Java Runtime Environment of Java version 1.4 or higherinstalled to run the James application. The exact JREs available depend on theplatform. A JRE must be downloaded and installed before James can run. Inaddition, the environment variable JAVA_HOME must be set to the JRE homedirectory before running James.
It is important to realize that the James configuration files are not unpackedfrom the James distribution until the first time James is started. This is aconsequence of the design of the Avalon Phoenix container used to run James.Once James has been started, the distribution will be unpacked. The servershould be stopped, the configuration files edited, and the server restarted.
So the installation sequence is: 1) Start, 2) Stop, 3) Edit, 4) Restart.
Installing a Stand-alone James Server
After unpacking the archive into your James installation directory, go to the binsubdirectory of the installation directory and run the "run" script (either run.shor run.bat, depending on your platform). The configuration file is now unpackedand available for editing.
-
8/2/2019 GAGS Documentation
26/54
Initial Configuration
After installing the binary, the next step is to adjust the initial configuration.The server should be stopped, (press ctrl + c) and then configuration can
proceed. The most essential configuration is set in the config.xml file. This filecan be found in the apps/james/SAR-INF subdirectory of the installationdirectory.
The out of the box configuration makes certain assumptions and has somedefault values that are unlikely to be appropriate for real-world servers. Thereare a few issues that should be addressed immediately upon installation:
RemoteManager Administrator Account - Before the RemoteManagerservice can be used to add users to this server installation anadministrator account must be created.
DNS Servers - James needs to have access to a DNS server for domainresolution. The out of the box configuration assumes that there is a DNSserver on localhost. In general administrators will have to change theconfiguration to point to a valid DNS server. This can be done byadjusting the dnsserver configuration block in the config.xml.
Managed Domain Names/IP Addresses - Out of the box, James onlyhandles mail that is sent to recipients at localhost. It will attempt todeliver all other email to remote SMTP servers. To allow James to handleemail for your domain or IP address, you simply need to add the
appropriate domain name or IP address to the servernames section of theconfig.xml.
-
8/2/2019 GAGS Documentation
27/54
Installing JavaMail
Introduction
There are two versions of the JavaMail API commonly used today: 1.2 and 1.1.3. All willwork with JDK 1.1.6+, Java 2 Platform, Standard Edition (J2SE) version 1.2.x, and J2SEversion 1.3.x.Note: After installing Sun's JavaMail implementation, you can find many exampleprograms in the demo directory.
Installing JavaMail 1.2
To use the JavaMail 1.2 API, unbundle the javamail-1_2.zip file, and add themail.jar file to your CLASSPATH. The 1.2 implementation comes with an SMTP,
IMAP4, and POP3 provider besides the core classes.
Installing JavaMail 1.1.3
To use the JavaMail 1.1.3 API, unbundle the javamail1_1_3.zip file, and add the
mail.jar file to your CLASSPATH. The 1.1.3 implementation comes with an SMTP
and IMAP4 provider, besides the core classes. If you want to access a POP server with
JavaMail 1.1.3, downloadand install a POP3 provider. Sun has one available separatefrom the JavaMail implementation. After downloading and unbundling pop31_1_1.zip,
add pop3.jar to your CLASSPATH, too.
Using JavaMail with the Java 2 Enterprise Edition
If we use J2EE, there is nothing special you have to do to use the basic JavaMail
API; it comes with the J2EE classes. Just make sure the j2ee.jar file is in yourCLASSPATH and you're all set.
-
8/2/2019 GAGS Documentation
28/54
With everything unzipped in a James directory, our hierarchy will look likeListing below.
Listing. James, JavaMail, and JAF directoriesJames+---jaf-1.0.2
| +---demo| \---docs
| \---javadocs+---james-2.1.2
| +---apps| +---bin| | \---lib| +---conf
| +---docs| | +---images| | \---stylesheets| +---ext
| +---lib| +---logs
\---javamail-1.3+---demo| +---client| +---servlet| \---webapp+---docs
| \---javadocs\---lib
In principle, James should work well on any platform that supports a suitableJava 1.4 VM.
-
8/2/2019 GAGS Documentation
29/54
SoftwareImplementation
-
8/2/2019 GAGS Documentation
30/54
Starting JAMES with the initiated Configuration
Once you have edited the configuration file you will need to restart James so
that the changes take effect. When James starts, a list of the James servicesand the ports on which they are listening should be displayed on the console.Additional information about the system configuration is printed in the Jameslog files upon startup. Finally, after configuration is complete, it will benecessary to create user accounts before the James server will be fullyoperational.
Creating User Accounts
User accounts are shared across services. A common user repository is sharedacross James services. That is, once you've created a POP3 mail account andset a password, that same account is available for authenticated SMTP andNNTP.
Before You Add Accounts
In James, user accounts are created throughout the RemoteManager. So, afterinstallation is complete, the first step to adding users is to configure theRemoteManager
You will need to have configured at least one administrator account andensured that the RemoteManager is enabled.
Also, you need to make sure that your user repository configuration is correctbefore adding any users. If you change your user repository type (i.e. file todatabase) or the configuration of your user repository (i.e. the file or databaseURL) after you have added users, you may lose your user data. Please changethese values with care.
After you've done this, restart James to ensure that any changes you've made
in the configuration are incorporated into the running system. You are nowready to create user accounts.
-
8/2/2019 GAGS Documentation
31/54
Once James is up and listening, adding a user is simple:
1. Telnet to the host and port on which the RemoteManager is listening. Forcommand-line telnet clients this is generally done by typing "telnet
" where is the James hostname and is theRemoteManager port specified in the James config.xml. In our case thehost name is gagsmail.com and the port is 4555.
2. You will be prompted for your administrator userid and password. Enterthe values you specified in the James config.xml.
-
8/2/2019 GAGS Documentation
32/54
3. After logging in, type "adduser " where is theuser name and is the password of the account you wish to create.Please note that the user name should NOT be a complete email address.Rather, all email addresses of the form @ (where
is any of the values specified in the block) will be delivered tothis account by default. Mailet configuration can change this default behavior.
4. Repeat step 3 for all user accounts you wish to create.
You can also view the number of users created by typing listusers.
That's it. Your user accounts are now created and can be used by all Jamesservices.
-
8/2/2019 GAGS Documentation
33/54
DESIGN
-
8/2/2019 GAGS Documentation
34/54
General Block Diagram
Object handling
Server
Browser
Internet
orIntranet
Program to
handle requests and process theinformation and send page
Database Mail Server
-
8/2/2019 GAGS Documentation
35/54
Architecture Diagram
Mail Information
User Information
ADD
MODIFY
VIEW
MANAGE
SEND
RECEIVE
Data Base
User
Information
James server
(Stores all
mails)
Add User
ModifyUser
View
ADMIN
User
DELETE
-
8/2/2019 GAGS Documentation
36/54
HomePage
User
Login
InboxCompos
e
Preference
s
Favourite
s
Logou
t
Check
mail
Display
mail
Download
Delete
mail
Send
mail
Send
attach
View
Chang
e
Tree Diagram
-
8/2/2019 GAGS Documentation
37/54
-
8/2/2019 GAGS Documentation
38/54
Table Diagram
Field name Field Type Length Description
Username Text 20 Stores id of the user
Password Text 8 Stores the password of the user
First name Text 20 Stores the first name of the user
Last name Text 20 Stores the last name of the userCity Text 10
Stores the address of the userState Text 10
Pin Number 7
Hintquestion Text 40 Hint Question for the account
Answer Text 10 Answer to the Hint Question
Above is the description of the fields of the database of the GAGS web messaging
& tools.Since the Username is unique that is no two user can have same user name hence
username is the Primary key.
The username & password are used to authenticate the user session when he logs in.
The name, city, state, pincode are just taken as the added information about the user.
This comes handy when the users forget their password. The Hint question & its
answer are basic requirements to retrieve the passwords.
All these fields can be changed by user after he logs in GAGS mail.
All this information is taken from the user when he fills the registration form.
-
8/2/2019 GAGS Documentation
39/54
User Manual
-
8/2/2019 GAGS Documentation
40/54
Login Page
This is the first page viewers user see once they visit our site. Our page
consists of login & password fields. Entering your user name & password takes
you to your email account for sending & receiving mails. Further details about
the email facility is provided in the Inbox section. For new users please refer
to the Registration of the new users section. If the registered user forgets
his/her password then the link Forgot my password will solve the problem.
Refer Logging On section for this.
-
8/2/2019 GAGS Documentation
41/54
Registration of new users
New users can visit our site by typing our address in the address bar of their
browsers. The first page i.e the login page will open. Our login page along with
other matters consists of a link called Not yet registered? Clicking on this will
take you to the registration form. Here enter your username, password & all
other necessary details. It is compulsory to fill all the fields. If any of these are
not entered then the form will not be accepted. Once you have filled the form
click the submit button at the button. If all your details are filled correctly then
you are registered. Now you can access your email whenever you want to.
-
8/2/2019 GAGS Documentation
42/54
Logging On
To logon simply visit our login page & type your user name & password. Click
the log in button. Once checked for authenticity you are dropped to your user
account. Once inside you will see your username & will be provided with 3
options namely Inbox, Compose & Logout. It also gives the number of
messages in the inbox. There is also a link called Forgot my password? on the
login page. This is helpful when you have forgotten your password & have
difficulty in logging. On this you enter your username. This displays your hint
question. All you have to do is enter your hint answer & we retrieve yourpassword for you. Incase you forget your hint answer, contact us
[email protected] (only genuine parties will be entertained).
-
8/2/2019 GAGS Documentation
43/54
Inbox
Clicking this button will take you inbox. Inbox is place where all your mails arestored. The following information about each mail in shown in the inbox the
subject of the mail, sender email ID, time the mail was sent, size of the mail
and size of attachment if any. Clicking on the subject of the mail let shows you
the contents of the respective mail. Next to each mail entry is checkbox,
selecting the boxes next read mails let you select mails for deletion. By clicking
the Delete selected button let you delete selected mail. We have also put to
links named select all clicking on any one of these selects all mails in the
inbox for deletion.
-
8/2/2019 GAGS Documentation
44/54
Reading of mails
When you want to read a particular mail click on the corresponding subject
which will show you the contents of the mail. This page is invoked when you
click on the subject of the mail. The page shows you the contents of the mail in
the center, above the mail are present two links namely. Forward and Reply.
The function of each of these is described in corresponding sections.
Attachments with the mail are shown at the bottom of the message. To know
more about the attachments kindly refer to downloading the attachment
section of this user manual.
-
8/2/2019 GAGS Documentation
45/54
Downloading the Attachments
If any attachments are present in the mail, they are shown at the end of the
mail. These attachments can be downloaded by clicking on the name of the
respective file. The attachment can be downloaded on to the client machine &
then user can access the file.
Click on Save Button to save the file.
-
8/2/2019 GAGS Documentation
46/54
Choose the path where you want to save the file. Then click on Save
After the file download completes, box appears and then the user can access
the attachments.
-
8/2/2019 GAGS Documentation
47/54
Reply
Once you view the mail on the top is a link name reply, by clicking on this linkyou can send the reply by typing the mail and clicking the send button the
advantage of this is you dont have to remember the address of the receiver
-
8/2/2019 GAGS Documentation
48/54
Forward
With the help of this facility the user send a mail present in his inbox to some
other email address. If there are any attachments present they are also
forwarded with the mail to the recipients. This can be useful when u want to
send pictures or text in your mail to someone.
-
8/2/2019 GAGS Documentation
49/54
Compose
This section let you write an email to someone. It consists of a to field. Here
you enter the email ID of the person you want to write the mail to(eg:[email protected]). The next field is the subject field where you write the subject
or the title of your mail. Cc means Carbon copy. This let you end a copy of
mail to one or more people at the same time. In this field you write the email
IDs of all the people you want to send a copy of the mail to. This facility may
be useful when you have to send a number of greetings on a festival or on
some similar occasion. Bcc or Blind carbon copy work similar to Cc, only
difference is that a Bcc sends an exact replica of mail to the recipient of the
mail.
The attachment field lets you send an attachment along with the mail. The
attachment may be in the form of a picture, an audio clip, a video clip or some
similar files that exist on your computer. Once you click the browse button,
folder browser dialog box opens which lets you select the file to be attached.
Once the send mail button is clicked the mail is sent.
mailto:[email protected]:[email protected] -
8/2/2019 GAGS Documentation
50/54
Preferences
Visiting this page shows you all your personal information like your name,
address, pincode, etc you entered while creating your account. On this page
you can change your username. Once you click submit button your
information will be update in our database.
-
8/2/2019 GAGS Documentation
51/54
FavoUrites
This is a section for entertainment for our user. Here we provide you with the
following facilities:
Know your horoscope for 2010: If you are an astrology buff then this
section is for you. Learn about how will be 2010 year for you.
Calendar: This section will provide you the calendar for the 2010 with list all
the holidays & days of importance.
Improve your General knowledge: If you are anxious to know about things
going on in the world & what is the biggest & largest in the world then this
section is for you.
Calculator: If you want to perform quick and simple calculations then use our
simple online Calculator.
-
8/2/2019 GAGS Documentation
52/54
Know about your 2010 horoscope
For all those of you interested in astrology this link will seem very interesting.
Find out how will be 2010 for you in terms of education, health etc.
Logout
The logout button ends your session and takes you back to the Login page.
Your mails wont be accessible once you logout.
-
8/2/2019 GAGS Documentation
53/54
Limitations &
Enhancements
We can enhance our project by implementing the following
features.
Implementation of the chat server.
Maintaining the contact list.
Folder Management for Inbox.
Implementation of Font toolbox for the message body so that user can
style their messages as needed.
Reporting of spam mails.
We can star the favorite messages so that they are directly available
under the starred mails link.
We can implement backgrounds & themes for user interface. We can set multiple Recipients at a time for sending the message.
The following enhancement could NOT be implemented.
Generate acknowledgements if message is sent to valid / existing users.
HTTPS support could not be implemented.
User online registration to mail server
-
8/2/2019 GAGS Documentation
54/54
References
1. books:
Html, Xhtml And CSS Bible 3rd Edition
Headfirst Java : Kathy Sierra
JSP, The Complete Reference: Phil Hanna
2. Websites:
java.sun.com
www.google.com
www.roseindia.com
www.apache.org