Beruflich Dokumente
Kultur Dokumente
ON
INTRALINK
THE LAN BASED MAILING SERVICE
Bachelor of Technology
In
Infor mation Technology
VAIBHAV TYAGI
(2005-2009)
CERTIFICATE
This is to certify that VAIBHAV TYAGI, Roll No. 0861641505 ,Sem-VIII of University
LAN Based Mailing Service” in the partial fulfillment of the requirement for award of
The work is original and it has not been submitted earlier either in part or in full for any
purpose.
DATED:
Ms.Anju Saha
Sr. Lecturer
USIT,
G.G.S. I.P.U,
This is to certify that VAIBHAV TYAGI, Roll No. 0861641505 ,Sem-VIII of University
LAN Based Mailing Service” in the partial fulfillment of the requirement for award of
The work is original and it has not been submitted earlier either in part or in full for any
purpose.
DATED:
Mr Sanjay Pal
Additional Director
RAC, DRDO
Ministry of Defence
I feel pride in placing on record our deep gratitude to our honourable guide Ms. Anju Saha
who despite her extremely tight and busy time schedule spared enough quality time to
guide me throughout the journey of this project. Whether it was removing bugs from the
programs or clearing our doubts, She helped me in solving all the problems with
comfortable ease. She also encouraged and motivated me to sail through in difficult times.
It is hard to imagine successful completion of such a project without her able guidance ,
The task is major and so is the contribution of friends, family members and teachers. People
are my own and with a great sense of modesty, they prefer their names not to be written
My sincere thanks to one and all, associated with this project directly or indirectly at any
point of time.
Vaibhav Tyagi
B.Tech(IT)
I feel pride in placing on record our deep gratitude to our honourable guide Mr. Sanjay Pal
who despite his extremely tight and busy time schedule spared enough quality time to
guide me throughout the journey of this project. Whether it was removing bugs from the
programs or clearing our doubts, he helped me in solving all the problems with comfortable
ease. She also encouraged and motivated me to sail through in difficult times. It is hard to
imagine successful completion of such a project without her able guidance , care and
inspiration. We are grateful to Ms. Anju Saha for her helping hand and sparing her valuable
time. Their painstaking and timely guidance evokes in us natural good feelings and
The task is major and so is the contribution of friends, family members and teachers. People
are my own and with a great sense of modesty, they prefer their names not to be written
My sincere thanks to one and all, associated with this project directly or indirectly at any
point of time.
Vaibhav Tyagi
B.Tech(IT)
In the modern times everything is jet fast. This all can be attributed to fast communication.
The dynamic nature of the world emphasizes this need strongly. Electronic Mail is one such
medium, which provides fast and cheap communication. An email can be received in any
The purpose of this project is to provide a platform where the employees of an organization
can exchange mails and files on a particular LAN. A user’s mails will be stored on the server
and they will be stay there until he/she deletes them explicitly. User also has the functionality
of sending mails originating from his account. He/she can choose to compose a new message
The user is assigned three folders INBOX, SENT and ADRESS BOOK.
All the messages intended for the user are stored in the folder INBOX.
All the messages sent by the user are stored in the SENT folder.
The user can maintain an ADDRESS BOOK which contains the contacts of all other users
on the system that the user needs to communicate with. The user can also search for the
record of a particular contact in the address book if and when he desires to.
The user can also view his/her profile and customize the session pages through the
Design wise, the application is divided in two components: the Internal component and the
User Interface component. The internal component consists of a thread daemon, which
fetches the mails intended for the user from the server and stores it in a database.
The User Interface component consists of the functionality of features like composing a
mail, reading mails from the inbox, viewing the mails sent, adding and retrieving contacts
provided to the end user. This component is developed using Java Servlets, Java Server
Pages and Hyper Text Markup Language. The data required for the servlets is fetched from
the Database in Microsoft Access, which is assumed to be updated by the daemon as per the
user requests. The two components work independent of each other. The only common thing
between them is the database and the connectivity between them is provided using the Java
1. INTRODUCTION……………………………………………………….1
Aim………………………………………….………………………………..1
Intralink at a glance………………………………………….……………….1
Objective…………………………………………….……………………….2
Purpose………………………………………………..……………………...2
Scope……………………………………………………..…………………..3
Functions………………………………………………..…………………....3
Key Features……………………………………………..…………………..4
2. SYSTEM ANALYSIS…………………………………………………..7
Identification of Need……………………………………………………….7
Preliminary Investigation……………………………………………………7
3. REQUIREMENTS……………………………………………………..10
Hardware Requirements……………………………………………………10
Software Requirements…………………………………………………….10
4. TECHNOLOGIES USED………………………………….…………11
Web Server………………………………………………….………….….11
Mail Server………………………………………………………..……….11
Mailing Mechanism…………………………………………..…………...13
Protocols Used…………………………………………………….……..14
5. DESIGN………………………………………...…………………...28
Sequence Diagrams………………………………...……………………33
6. DATABASE DESIGN…………………….……………………….36
7. SCREENSHOTS……………………………………………..……..40
User End………………………………………………………..……….40
Admin End……………………………………………………...……….62
8. FUTURE SCOPE……………………………………...……...…….67
10. CONCLUSION………………………………………….....………69
INTRODUCTION
1.1 AIM
The aim of this project is to provide a LAN based mailing service that connects
various users on the system. The system has all the basic features of a standard
mailing system like composing mails, reading mails, viewing the sent mails, adding or
retrieving contacts. It should also provide the feature of user customization wherein
the user can change the appearance of his session pages. The project should also
provide an administrator interface through which the administrator can access and
control the system , that is the activation, deactivation and deletion of accounts, the
facility of taking the database backup. The project also enables the administrator to
organization can exchange mails and files on a particular LAN. A user’s mails will be
stored on the server and they will be stay there until he/she deletes them explicitly.
User also has the functionality of sending mails originating from his account. He/she
can choose to compose a new message or reply to a received message or even forward
a mail as it is.
Design wise, the application is divided in two components: the Internal component
and the User Interface component. The internal component consists of a thread
-1-
daemon, which fetches the mails intended for the user from the server and stores it in a
database.
The User Interface component consists of the functionality of features like composing
a mail, reading mails from the inbox, viewing the mails sent, adding and retrieving
contacts provided to the end user. This component is developed using Java Servlets,
Java Server Pages and Hyper Text Markup Language. The data required for the
updated by the daemon as per the user requests. The two components work
independent of each other. The only common thing between them is the database and
the connectivity between them is provided using the Java Data Base
Connectivity(JDBC).
1.3 OBJECTIVE
1.3.1 Purpose
The entity is implemented using Servlets, the user submits his requests and the output
is presented to the user in the formatted way after querying the server.
The user can read his messages, reply to them, forward these messages or delete them.
There are different servlets that implement different functions. These servlets are
-2-
All the information regarding the user and his messages in different folders are stored
in a database (MS-Access) and the servlets interface the database using the database
1.3.2 Scope
The software products produced are a host DBMS and a website. The DBMS will
maintain the records of all the users at a given time that are activated on the system by
the administrator, that is all the users who are authorized to send/receive messages on
the system. The database also keeps a track of all the messages sent on the system
along with the time of sending the mail. Along with that, the records of the contacts
added by the user are also stored in the database and of course, the user customization
information, which directs the system to use a particular selection for a given user.
The system will be used by a variety of people, of different age group, demographics,
and varied interests given that they belong to the same organization.
The goal of the software is to allow dynamic content maintenance and updation and
also session management during the sending or receiving of a particular mail for a
given user.
1.3.3 Functions
Composing a Mail:
The user can compose a mail and send it to all the recipients he wishes to
send to. The user can also attach a file along with the message as per the
requirement.
-3-
Reading a Mail:
The user can read a particular mail by clicking on the subject of the mail
Replying to a Mail:
The user can choose to reply to a particular mail after viewing it. When he
Deleting a Mail:
The user can delete a particular mail or a list of mails to avoid cluttering of
Check Mail:
Reply to a Mail:
The user can choose to reply to a particular mail after reading it. Selecting
this option, the user can send the information he wants to convey with or
-4-
Deleting a Mail:
The system provides the user with the functionality of deleting any number
retrieved once they have been deleted that is, they are deleted permanently.
Composing Mail:
The user can compose a mail and send it to all the people he wishes to send
them to.
Attaching a file:
picture or anything that can be sent) along with the text message being
sent.
Sent Mail:
The mails sent by the user can be viewed in the Sent mail folder. The user
can check the mails when he wants to see the old mails sent by him.
Address Book:
The system allows the user to maintain an Address Book which holds the
-5-
Searching in the Address Book:
The user can view the details of his/her account using this option.
User Customization:
The system also provides the end user with the functionality of changing
-6-
SYSTEM ANALYSIS
has been done. The basic need of the client to opt for such kind of project is analyzed.
The purpose of this project is to provide this Email facility to common man, free of
cost. All user’s mails will be stored on the server and they will be there until he deletes
them .
The Manual Process of mailing, which is not at all compatible with current working
conditions of users. It was not only time consuming, but also lacks accuracy. Security
point of view the manual system was failed to hide the information from any
System, which can full fill all of the current as well as future mailing requirements.
The client is a user in an organization who wants to open an email account . He should
be provided with all the basic facilities for mailing and some other perks like address
Administrator has authority to the check the status of any user at any time.
Administrator can Activate or De-Activate the user account on the basis of certain
criteria.
-7-
Different Modules In Computerized System:
Module 2: Authentication:
user have an access to the system. There are two types of users namely:
• ADMINISTRATOR
• USER
Administrator has the privilege to Activate or De-Activate the user account on the
basis of certain criteria. He can also have a look at the original MS-Access
database.
In this module, the user has been given the facility to compose a mail and sent it to
all other user he wants one by one. The user can attach any file along with message
if he wants.
-8-
Module 5: Sent mail Module
In this module, the mails sent by the user are saved in Sent mail folder. He/She can
In this module the user is allowed to maintain an Address Book which will have all
This module helps the user to customize his/her account wherein he/she can change
-9-
REQUIREMENTS
equipment.
It refers to the physical devices of a computer system. Thus the input, storage,
o HDD: 4 GB or higher
o Database : MS-ACCESS
- 10 -
TECHNOLOGIES USED
servlet container that is used in the official Reference Implementation for the Java
Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages
specifications are developed by Sun under the Java Community Process. Apache
Tomcat is developed in an open and participatory environment and released under the
best-of-breed developers from around the world. We invite you to participate in this
The mail server used in the project is SurgeMail. It provides the basic functionalities
of a standard mail server like making new users accounts, deleting user accounts,
holding an inbox for every user etc. instead of SurgeMail any of the mail servers
The front end of the project is made with the help of Java Server Pages(JSP),
- 11 -
Java Server Pages (JSP) technology enables Web developers and designers to
rapidly develop and easily maintain, information-rich, dynamic Web pages that
leverage existing business systems. As part of the Java technology family, JSP
independent. JSP technology separates the user interface from content generation,
enabling designers to change the overall page layout without altering the underlying
dynamic content.
o Use JSP technology without having to learn the Java language: You can
use JSP technology without learning how to write Java scriplets. Although
scriptlets are no longer required to generate dynamic content, they are still
o Extend the JSP language: Java tag library developers and designers can
extend the JSP language with "simple tag handlers," which utilize a new, much
simpler and cleaner, tag extension API. This spurs the growing number of
pluggable, reusable tag libraries available, which in turn reduces the amount of
o Easily write and maintain pages: The JavaServer Pages Standard Tag
Library (JSTL) expression language is now integrated into JSP technology and
has been upgraded to support functions. The expression language can now be
- 12 -
JavaScript is used in millions of Web pages to improve the design, validate forms,
detect browsers, create cookies, and much more. JavaScript is the most popular
scripting language on the internet, and works in all major browsers, such as Internet
Explorer, Mozilla, Firefox, Netscape, and Opera. JavaScript was designed to add
embedded direct into the HTML pages. It is an interpreted language that is scripts
license.
HTML stands for Hyper Text Markup Language. An HTML file is a text file
containing small markup tags. The markup tags tell the Web browser how to display
the page. An HTML file must have an htm or html file extension. An HTML file can
Back End used here is MS-Access. All the data base tables related to the project are
made in MS-Acess.
Java Mail API is used for the internal mechanism for storing and transporting of mails.
The JavaMail API is an optional package (standard extension) for reading, composing,
and sending electronic messages. The package is used to create Mail User Agent
(MUA) type programs, similar to Eudora, Pine, and Microsoft Outlook. Its main
- 13 -
purpose is not for transporting, delivering, and forwarding messages like sendmail or
other Mail Transfer Agent (MTA) type programs. In other words, users interact with
MUA-type programs to read and write emails. MUAs rely on MTAs to handle the
actual delivery.
The JavaMail API is designed to provide protocol-independent access for sending and
The first part of the API deals with, how to send and receive messages independent 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 a server, we need a
SMTP:
The Simple Mail Transfer Protocol (SMTP) is the mechanism for delivery
server will relay the message on to the SMTP server of the recipient(s) to
eventually be acquired by the user(s) through POP or IMAP. This does not
- 14 -
configured properly. There is nothing in the JavaMail API for tasks like
accounts.
POP
POP stands for Post Office Protocol. Currently in version 3, also known as
POP3. POP is the mechanism most people on the Internet use to get their
mail. It defines support for a single mailbox for each user. That is all it
does, and that is also the source of most confusion. Much of what people
are familiar with when using POP, like the ability to see how many new
mail messages they have, are not supported by POP at all. These
which remember things like the last mail received and calculate how many
are new for you. So, when using the JavaMail API, if you want this type of
MIME
- 15 -
4.4.2 The Core Classes
The core classes that make up the API are: Session, Message, Address,
Authenticator, Transport, Store, and Folder. All these classes are found in the
i) Session
The Session class defines a basic mail session. It is through this session that
password, and other information that can be shared across your entire application.
The constructors for the class are private. We can get a single default session that can
with getInstance().
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
separate.
ii) Message
Once we have our Session object, it is time to move on to creating the message to
send. This is done with a type of Message. Being an abstract class, you must work
- 16 -
is a email message that understands MIME types and headers, as defined in the
different RFCs. Message headers are restricted to US-ASCII characters only, though
constructor:
Once we have our message, we can set its parts, as Message implements the Part
the content is the setContent() method, with arguments for the content and the mime
type:
message.setContent("Hello", "text/plain");
If, however, we know we are working with a MimeMessage and our message is plain
text, we can use its setText() method which only requires the actual content,
message.setText("Hello");
For plain text messages, the latter form is the preferred mechanism to set the content.
For sending other kinds of messages, like HTML messages, use the former.
message.setSubject("First");
- 17 -
iii) Address
Once we have created the Session and the Message, as well as filled the message
with content, it is time to address the letter with an Address. Like Message, Address
To create an address with just the email address, pass the email address to the
constructor:
If we want a name to appear next to the email address, you we pass that along to the
constructor, too:
"George Bush");
We need to create address objects for the message's from field as well as the to field.
Unless there is a problem in the mail server, there is nothing that can stop us from
Once the addresses has been created, we connect them to a message in one of two
ways. For identifying the sender, we use the setFrom() and setReplyTo() methods.
message.setFrom(address)
If the message needs to show multiple from addresses, use the addFrom() method:
- 18 -
message.addFrom(address);
For identifying the message recipients, the addRecipient() method is used. This
message.addRecipient(type, address)
Message.RecipientType.TO
Message.RecipientType.CC
Message.RecipientType.BCC
The JavaMail API provides no mechanism to check for the validity of an email
address.
iv) Transport
The final part of sending a message is to use the Transport class. This class speaks
abstract class and works something like Session. The default version of the class can
Transport.send(message);
- 19 -
Or, one can get a specific instance from the session for your protocol, passing along
the username and password (blank if unnecessary), send the message, and close the
transport.sendMessage(message, message.getAllRecipients());
transport.close();
The latter way is best when one needs to send multiple messages, as it will keep the
connection with the mail server active between messages. The basic send()
mechanism makes a separate connection to the server for each method call.
after getting the session, we connect to a Store, quite possibly with a username and
password or Authenticator. Like Transport, one tells the Store what protocol to
use:
- 20 -
After connecting to the Store, one can then get a Folder, which must be opened
folder.open(Folder.READ_ONLY);
For POP3, the only folder available is the INBOX. If you are using IMAP, you can have
Once we have a Message to read, we can get its content with getContent() or write
its content to a stream with writeTo(). The getContent() method only gets the
System.out.println(((MimeMessage)message).getContent());
Once you're done reading mail, close the connection to the folder and store.
folder.close(aBoolean);
store.close();
The boolean passed to the close() method of folder states whether or not to update
- 21 -
4.4.3 Using the Java Mail API
i) Sending Messages
Sending an email message involves getting a session, creating and filling a message,
and sending it. One can specify his/her SMTP server by setting the mail.smtp.host
property for the Properties object passed when getting the Session:
String to = ...;
props.put("mail.smtp.host", host);
// Get session
// Define message
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
- 22 -
message.setSubject("Hello JavaMail");
message.setText("Welcome to JavaMail");
// Send message
Transport.send(message);
One should place the code in a try-catch block, as setting up the message and sending
For reading mail, we get a session, get and connect to an appropriate store for our
mailbox, open the appropriate folder, and get our message(s). Also, we need to close
// Get session
- 23 -
store.connect(host, username, password);
// Get folder
folder.open(Folder.READ_ONLY);
// Get directory
+ "\t" + message[i].getSubject());
// Close connection
folder.close(false);
store.close();
The above code block just displays who the message is from and the subject.
Deleting messages involves working with the Flags associated with the messages.
There are different flags for different states, some system-defined and some user-
defined. The predefined flags are defined in the inner class Flags.Flag and a few
Flags.Flag.ANSWERED
Flags.Flag.DELETED
- 24 -
Flags.Flag.RECENT
Flags.Flag.SEEN
Just because a flag exists doesn't mean the flag is supported by all mail
servers/providers. For instance, besides deleting messages, the POP protocol supports
none of them. Checking for new mail is not a POP task but one built into mail clients.
message.setFlag(Flags.Flag.DELETED, true);
folder.open(Folder.READ_WRITE);
Then, when you are done processing all messages, close the folder, passing in a true
folder.close(true);
To unset a flag, just pass false to the setFlag() method. To see if a flag is set, check
with isSet().
The Message class includes a reply() method to configure a new Message with the
proper recipient and subject, adding "Re: " if not already there. This does not add any
content to the message, only copying the from or reply-to header to the new recipient.
- 25 -
The method takes a boolean parameter indicating whether to reply to only the sender
Attachments are resources associated with a mail message, usually kept outside of the
message like a text file, spreadsheet, or image. As with common mail programs like
Eudora and pine, one can attach resources to your mail message with the JavaMail
API and get those attachments when you receive the message.
Sending Attachments
Sending attachments is quite like building up the parts to make the complete message.
After the first part, the message text, we add other parts where the DataHandler for
each is your attachment, instead of the shared handler in the case of a forwarded
message. If one is reading the attachment from a file, his/her attachment data source is
original filename for the attachment, the last thing to do is to set the filename
Getting Attachments
Getting attachments out of one’s messages is a little more involved than sending them,
Multipart object when it has attachments. One then needs to process each Part, to
get the main content and the attachment(s). Parts marked with a disposition of
- 26 -
Part.ATTACHMENT from part.getDisposition() are clearly attachments. However,
attachments can also come across with no disposition (and a non-text MIME type) or a
Part.INLINE, you can save off the content for that message part. Just get the original
The saveFile() method just creates a File from the filename, reads the bytes from
the input stream, and writes them off to the file. In case the file already exists, a
number is added to the end of the filename until one is found that doesn't exist.
- 27 -
DESIGN
through an information system. A data flow diagram can also be used for the
designer to draw a context-level DFD first which shows the interaction between the
system and outside entities. This context-level DFD is then "exploded" to show more
Top-Down Approach
1. The system designer makes a context level DFD, which shows the interaction (data
flows) between the system (represented by one process) and the system
2. The system is decomposed in lower level DFD (Zero) into a set of processes, data
stores, and the data flows between these processes and data stores.
3. Each process is then decomposed into an even lower level diagram containing its
subprocesses.
and sufficient level of detail is reached which is called the primitive process (aka
- 28 -
The following are the 0-level and 1-level data flow diagrams related to this project:
0-level DFD
1-level DFD(admin)
- 29 -
1-level DFD (user)
- 30 -
5.2 USE CASE DIAGRAM
Use case diagram is the graphical representation of a system describing the “what” of
These can be decomposed into further levels of abstraction. The components are:
1. Actor: An actor or an external agent lies outside the system model but
2. Use case: It is initiated by the user with a particular goal in mind, and
- 31 -
Use case diagram
- 32 -
5.3 SEQUENCE DIAGRAMS
A Sequence diagram depicts the sequence of actions that occur in a system. The
invocation of methods in each object, and the order in which the invocation occurs is
captured in a Sequence diagram. This makes the Sequence diagram a very useful tool
life of the object that it represents, while on the vertical axis, it shows the sequence of
Because it uses class name and object name references, the Sequence diagram is very
useful in elaborating and detailing the dynamic design and the sequence and origin of
invocation of objects. Hence, the Sequence diagram is one of the most widely used
exactly how they have been represented in all UML diagrams—as rectangles with the
The name to the left of the ":" is the object name and to its right is the class name.
- 33 -
type of message, the notation differs. In a Sequence diagram, you can represent simple
- 34 -
User end sequence diagram
- 35 -
DATABASE DESIGN
The following are the tables made in the database as Back End
User
Mem_login Text 50
Mem_password Text 50
Men_name Text 50
Mem_lname Text 50
Mem_gender Text 50
Mem_month Text 50
Activate Text 50
- 36 -
Address Book
UserId Text 50
Name Text 50
Email Text 50
Inbox
userid Text 50
- 37 -
mdate Text 50
mtime Text 50
to Text 50
mfrom Text 50
cc Text 50
sub Text 50
attach text 50
Themes
username Text 50
tableimage Text 50
bgimage Text 50
- 38 -
Admin
admin_name Text 50
admin_password Text 50
- 39 -
SCREENSHOTS
Registration page
- 40 -
Filled registration page
- 41 -
Registration done
- 42 -
Login page
- 43 -
Error in login
- 44 -
If fields are not filled properly
- 45 -
User entries
- 46 -
User home
- 47 -
Composing mail
- 48 -
Attaching a file
- 49 -
User inbox
- 50 -
read message
- 51 -
Attachment download
- 52 -
Reply to a mail
- 53 -
Address book
- 54 -
Add contact
- 55 -
Searching
- 56 -
Search results
- 57 -
Sent items
- 58 -
My settings
- 59 -
Changing theme
- 60 -
Changed theme
- 61 -
7.2 ADMIN END
- 62 -
Admin home
- 63 -
Activate/deactivate profile
- 64 -
Taking database backup
- 65 -
Password change
- 66 -
FUTURE SCOPE
The Project can be upgraded to a fully Functional Mailing system after adding the
Searching in the address book on the basis of any field and selecting the
Text formatting.
- 67 -
BIBLIOGRAPHY and REFERENCES
www.java.sun.com
www.w3schools.com
- 68 -
CONCLUSION
This project is designed to meet the requirements of a standard mailing system. It has
been developed using JSP, HTML, JavaScript and JDBC and the database has been
built in MS-Access. For designing the system we have used simple data flow
Using system analysis and design techniques like data flow diagrams, use case
Understanding programming logic and language along with the utilities like
reports.
- 69 -