Vous êtes sur la page 1sur 76

INTRANET E-MAIL SYSTEM

ABSTRACT

1
INTRANET E-MAIL SYSTEM
The project Entitle “Intranet E-mail System” deals with identifying the clients to send and
receive mail with the same login. This utility will allow multiple clients to login under the same
login name and still have personalized mail information, enabling them to send and receive mails.
Each user willing to avail the services offered by the mail server application should exist as a
user before he can send or receive mails. This is made possible by prompting each user to enter
his user-id and password before he can send or view his mails. This project has Inbox, compose,
sent mails, trash, draft and address list. E-mail is one of the most common and reliable methods
of communication for both personal and business purposes. It also plays an important role in each
and every Web site. This role will be in the type of automated e-mails from the server after
posting information from a form.

The main feature of the project is the acknowledgment technology on sent mails, as the
receiver opens the mail the sender will get an acknowledgment mail that the mail have been seen
by the receiver. This helps the sender to know the mail is not missed.

The administration section of the project has different features like to provide complete
information of the project including the users and mails etc. The administrator is vested with the
powers to manage the users, automatically maintains the activity log of the users login-logout.

The entire project has been developed keeping in view of the distributed client server
computing technology, in mind. The specification has been normalized up to 3NF to eliminate
all the anomalies that may arise due to the database transaction that are executed by the general
users and the organizational administration. The user interfaces are browser specific to give
distributed accessibility for the overall system. The internal database has been selected as MS-
SQL server 200.The basic constructs of table spaces, clusters and indexes have been exploited to
provide higher consistency and reliability for the data storage. The MS-SQL server 200 was a
choice as it provides the constructs of high-level reliability and security. The total front end was
dominated using the ASP.Net technologies. At all proper levels high care was taken to check that
the system manages the data consistency with proper business rules or validations. The
authentication and authorization was crosschecked at all the relevant stages. The user level
accessibility has been restricted into two zones namely.

2
INTRANET E-MAIL SYSTEM
TABLE OF CONTENTS

1. INTRODUCTION ……………………………………….……………....3
1.1OVERVIEW OF THE PROJECT……………..….…………………..4
1.2AIM OF THE PROJECT………………………….…………………..4
1.3SCOPE OF THE PROJECT………………..……….………………...4
2. TOOLS AND PLATFORM……………………………….………….....5
2.1 LANGUAGES…………………………………….……….………….6
2.2 DATABASE……………………………………….…….…………....9
2.3 PLATFORM……………………………………….…………………11
3. ORGANIZATION PROFILE………………………...…….................13
4. PROBLEM DEFINITION……..…………………..………….…….....15
4.1 PROBLEM DEFINITION.................................................………...16
4.2EXISTING SYSTEM…………………………..……...…….............16
4.3PROPOSED SYSTEM…………………………….………..…….....16
4.4FEASIBILITY STUDIES…………………..………...………………17
4.4.1 TECHNICAL FEASIBLITY………………...…….…........17
4.4.2 ECONOMICAL FEASIBLITY………………………..…..18
4.4.3 OPERATIONAL FEASIBLITY……………………….......18
5. SYSTEM REQUIREMENT SPECIFICATION………………..........19
5.1SOFTWARE SPECIFICATION……………………...………….....20
5.2 HARDWARE SPECIFICATION……………………………………20
6. DESIGN TOOL………….…………………………………………….....21
6.1 DFD…………………………………………………………………...22

3
INTRANET E-MAIL SYSTEM
7. SYSTEM DESIGN………..…………………………….…..…………..25
7.1 INTRODUCTION……………………………………..…………….26
7.2 MODULAR DESIGN……………………….……….…….………..26
7.3 INPUT DESIGN……………………………….……...…………......30
7.4 OUTPUT DESIGN…………………………...…………..….............30
7.5 DATABASE DESIGN………………………..……………………...31
8. SYSTEM TESTING…………………………………...………..............37
9. SYSTEM IMPLEMENTATION…………………...………………......40
9.1 SYSTEM IMPLEMENTATION……………………………….…...41
9.2 IMPLEMENTATION PLAN………………...……………………..41
10.MAINTENANCE AND REVIEW……………………………………..44
11.CONCLUSION………………………………………………………….46
12.APPENDIX………………………………………………………...........49
12.1 SAMPLE CODE……………………………………..…………….50
12.2 SCREEN SHOTS………………………..………………………....65
13. BIBLIOGRAPHY………………………………….……………...........74

4
INTRANET E-MAIL SYSTEM

INTRODUCTION

5
INTRANET E-MAIL SYSTEM
1.1 OVERVIEW OF THE PROJECT
The project Entitled “INTRANET E-MAIL SYSTEM” is developed to deal with sending and
receiving mails of the registered users of the Mail Server System. It is a Web based mail Server
where the registered users can login, compose, send, delete as well as save the mails. The system
maintains the contacts of the users automatically.
This project is also performing the Administrator functions like managing the users,
resetting the password, creating the log of the login and logout information etc.

1.2 AIM OF THE PROJECT


The main objectives of the project titled “INTRANET E-MAIL SYSTEM”is to manage
the mails of the users and make the communication easier between different users in an intranet
environment.it is designed such a way that the different functionalities of the mail system can be
found under one roof. Comparing the existing system new features can be found in the system
which make the communication a lot better.

1.3 SCOPE OF THE PROJECT


This project is useful for intranet mail application for communicating within the
organizationfor communication between employees in organization. This project includes all the
features of a mail system plus additional features.
Themain advantages of the new system are:
 Simple and Reliable.
 Security Enhancement.
 Mail Acknowledgment System.
 Blocking an Existing User.
 Login – Logout Activity Log Generation.
 Resetting the Password.
 Attachment of Contents.
 More user friendly.

6
INTRANET E-MAIL SYSTEM

TOOLS AND PLATFORMS

7
INTRANET E-MAIL SYSTEM
2.1 LANGUAGES
Microsoft .NET is software that connects information, people, systems, and devices. It spans clients,
servers, and developer tools, and consists of:

The .NET Framework 1.1, used for building and running all kinds of software, including Web-
based applications, smart client applications, and XML Web services—components that facilitate
integration by sharing data and functionality over a network through standard, platform-independent
protocols such as XML (Extensible Markup Language), SOAP, and HTTP.

Developer tools, such as Microsoft Visual Studio .NET 2003 which provides an integrated
development environment (IDE) for maximizing developer productivity with the .NET Framework.

A set of servers, including Microsoft Windows Server 2000, Microsoft SQL Server, and Microsoft
BizTalk Server, that integrates, runs, operates, and manages Web services and Web-based
applications.

Client software, such as Windows XP, Windows CE, and Microsoft Office XP, that helps
developers deliver a deep and compelling user experience across a family of devices and existing
products.

What is the .NET Framework?

The .NET Framework is an integral Windows component for building and running the next
generation of software applications and Web services. The .NET Framework: Supports over 20
different programming languages. Manages much of the plumbing involved in developing software,
enabling developers to focus on the core business logic code. Makes it easier than ever before to
build, deploy, and administer secure, robust, and high-performing applications. The .NET
Framework is composed of the common language runtime and a unified set of class libraries.

8
INTRANET E-MAIL SYSTEM
ASP.NET

ASP.NET is a programming framework built on the common language runtime that can be used on
a server to build powerful Web applications. ASP.NET offers several important advantages over
previous Web development models

 Enhanced Performance.
ASP.NET is compiled common language runtime code running on the server. Unlike its
interpreted predecessors, ASP.NET can take advantage of early binding, just-in-time compilation,
native optimization, and caching services right out of the box. This amounts to dramatically better
performance before you ever write a line of code

 World-Class Tool Support.


The ASP.NET framework is complemented by a rich toolbox and designer in the Visual
Studio integrated development environment. WYSIWYG editing, drag-and-drop server controls, and
automatic deployment are just a few of the features this powerful tool provides

 Power and Flexibility.


Because ASP.NET is based on the common language runtime, the power and flexibility of
that entire platform is available to Web application developers. The .NET Framework class library,
Messaging, and Data Access solutions are all seamlessly accessible from the Web. ASP.NET is also
language-independent, so you can choose the language that best applies to your application or
partition your application across many languages. Further, common language runtime
interoperability guarantees that your existing investment in COM-based development is preserved
when migrating to ASP.NET.

 Simplicity.
ASP.NET makes it easy to perform common tasks, from simple form submission and client
authentication to deployment and site configuration. For example, the ASP.NET page framework
allows you to build user interfaces that cleanly separate application logic from presentation code and
to handle events in a simple, Visual Basic - like forms processing model. Additionally, the common
language runtime simplifies development, with managed code services such as automatic reference
counting and garbage collection
9
INTRANET E-MAIL SYSTEM
 Manageability.
ASP.NET employs a text-based, hierarchical configuration system, which simplifies applying
settings to your server environment and Web applications. Because configuration information is
stored as plain text, new settings may be applied without the aid of local administration tools. This
"zero local administration" philosophy extends to deploying ASP.NET Framework applications as
well. An ASP.NET Framework application is deployed to a server simply by copying the necessary
files to the server. No server restart is required, even to deploy or replace running compiled code.

 Scalability and Availability.


ASP.NET has been designed with scalability in mind, with features specifically tailored to
improve performance in clustered and multiprocessor environments. Further, processes are closely
monitored and managed by the ASP.NET runtime, so that if one misbehaves (leaks, deadlocks), a
new process can be created in its place, which helps keep your applications constantly available to
handle requests

 Security.
With built in Windows authentication and per-application configuration, you can be assured
that your applications are secure.

 Language Support
The Microsoft .NET Platform currently offers built-in support for three languages: C#, Visual
Basic, and JScript. The exercises and code samples in this tutorial demonstrate how to use C#, Visual
Basic, and JScript to build .NET applications

 Language Compatibility
The differences between the VBScript used in ASP and the Visual Basic .NET language used
in ASP.NET are by far the most extensive of all the potential migration issues. Not only has
ASP.NET departed from the VBScript language to "true" Visual Basic, but the Visual Basic language
itself has undergone significant changes in this release. The changes are designed to:

Make the language more consistent by bringing together features of the language with similar
purposes. Simplify the language by redesigning the features that made Visual Basic less than "basic."
Improve readability and maintainability by redesigning features that hid too many important details
10
INTRANET E-MAIL SYSTEM
from the programmer. Improve robustness by enforcing better practices, such as type-safe
programming.

NEW IN ASP.NET 2010

 Dynamic Support
 Office Programmability
 Type Equivalence Support
 Covariance and Contravariance
 New Command-Line Options

2.2DATABASE
MICROSOFT SQL SERVER 2008

Microsoft SQL Server is a relational database management system developed by Microsoft.


As a database, it is a software product whose primary function is to store and retrieve data as
requested by other software applications, be it those on the same computer or those running
on another computer across a network (including the Internet). There are at least a dozen
different editions of Microsoft SQL Server aimed at different audiences and for workloads
ranging from small single-machine applications to large Internet-facing applications with
many concurrent users. Its primary query languages are T-SQL and ANSI SQL.

SQL Server 2008 (formerly codenamed "Katmai") was released on August 6, 2008
and aims to make data management self-tuning, self-organizing, and self-maintaining with the
development of SQL Server Always On technologies, to provide near-zero downtime. SQL
Server 2008 also includes support for structured and semi-structured data, including digital media
formats for pictures, audio, video and other multimedia data. In current versions, such multimedia
data can be stored as BLOBs (binary large objects), but they are generic bit streams. Intrinsic

awareness of multimedia data will allow specialized functions to be performed on them.


According to Paul Flessner, senior Vice President, Server Applications, Microsoft Corp., SQL
11
INTRANET E-MAIL SYSTEM
Server 2008 can be a data storage backend for different varieties of data: XML, email,
time/calendar, file, document, spatial, etc. as well as perform search, query, analysis, sharing,
and synchronization across all data types.

Other new data types include specialized date and time types and a Spatial data
type for location-dependent data. Better support for unstructured and semi-structured data is
provided using the new FILESTREAM data type, which can be used to reference any file stored
on the file system. Structured data and metadata about the file is stored in SQL Server database,
whereas the unstructured component is stored in the file system. Such files can be accessed both
via Win32 file handling APIs as well as via SQL Server using T-SQL; doing the latter accesses
the file data as a BLOB. Backing up and restoring the database backs up or restores the referenced
files as well. SQL Server 2008 also natively supports hierarchical data, and includes T-SQL
constructs to directly deal with them, without using recursive queries.

The Full-text search functionality has been integrated with the database engine.
According to a Microsoft technical article, this simplifies management and improves
performance. Spatial data will be stored in two types. A "Flat Earth" (GEOMETRY or planar)
data type represents geospatial data which has been projected from its native, spherical,
coordinate system into a plane. A "Round Earth" data type (GEOGRAPHY) uses an ellipsoidal
model in which the Earth is defined as a single continuous entity which does not suffer from the
singularities such as the international dateline, poles, or map projection zone "edges".
Approximately 70 methods are available to represent spatial operations for the Open Geospatial
Consortium Simple Features for SQL, Version 1.1.

SQL Server includes better compression features, which also helps in improving
scalability. It enhanced the indexing algorithms and introduced the notion of filtered indexes. It
also includes Resource Governor that allows reserving resources for certain users or workflows.

It also includes capabilities for transparent encryption of data (TDE) as well as


compression of backups. SQL Server 2008 supports the ADO.NET Entity Framework and the
12
INTRANET E-MAIL SYSTEM
reporting tools, replication, and data definition will be built around the Entity Data Model. SQL
Server Reporting Services will gain charting capabilities from the integration of the data
visualization products from Dundas Data Visualization, Inc., which was acquired by Microsoft.
On the management side, SQL Server 2008 includes the Declarative Management Framework
which allows configuring policies and constraints, on the entire database or certain tables,
declaratively. The version of SQL Server Management Studio included with SQL Server 2008
supports IntelliSense for SQL queries against a SQL Server 2008 Database Engine. SQL Server
2008 also makes the databases available via Windows Power Shell providers and management
functionality available as Cmdlets, so that the server and all the running instances can be
managed from Windows Power Shell.

2.3 PLATFORM
WINDOWS 7 PROFESSIONAL

Windows 7 is an operating system produced by Microsoft for use on personal computers,


including home and business desktops, laptops, net books, tablet PCs, and media center PCs. It
was released to manufacturing on July 22, 2009, and became generally available for retail
worldwide on October 22, 2009, less than three years after the release of its predecessor,
Windows Vista. Windows 7's server counterpart, Windows Server 2008 R2, was released at the
same time. Windows 7 is succeeded by Windows 8.
Unlike Windows Vista's many new features, Windows 7 was an
incremental upgrade designed to work with Vista-compatible applications and hardware.
Presentations given by Microsoft in 2008 focused on multi-touch support, an updated Windows
shell with a new taskbar, referred to internally as the Super bar, a home networking system called
Home Group, and performance improvements. Some standard applications that have been
included with prior releases of Microsoft Windows, including Windows Calendar, Windows
Mail, Windows Movie Maker, and Windows Photo Gallery, are not included in

Windows7; most are instead offered separately at no charge as part of the Windows Essentials
suite.

13
INTRANET E-MAIL SYSTEM
Other parts of this story package are dedicated to explaining how to
replicate Windows 7 features on a Vista or XP machine--and we offer so many suggestions that
you may be starting to think that perhaps there's no compelling reason to upgrade to Windows 7
after all. If so, you should think again.

Device Stage: Whereas Vista barely seems to recognize the presence of cameras, phones,
printers, and other external devices, Windows 7's Device Stage treats them like royalty. The
operating system devotes a slick-looking status window to each device, so you can browse files,
manage media, and perform other device-specific tasks.

Home Group: At long last, Microsoft promises to take the pain and frustration out of home
networking for users of its operating system. Set up a Home Group, and then add PCs and other
devices--and without further ado you can share files, printers, and the like.

Jump Lists: Like souped-up Recent Documents menus, Jump Lists provide quick access to
application-specific documents and/or tasks. For example, you can right-click the Internet
Explorer taskbar icon and choose from a list of frequently visited Web sites or from a list of
available tasks. Once you get started using Jump Lists, you'll wonder how you ever got along
without them.

Libraries: Most of us have documents, music, pictures, and video scattered across multiple
folders on our PCs. Libraries are special folders in Windows 7 that catalog these items under a
single roof, regardless of where you actually store them on your hard drive. And best of all,
Libraries are easy to share within your Home Group.

One-click Wi-Fi: Unlike Windows Vista, Windows 7 makes choosing a wireless network to
connect to simple and convenient: Click the system-tray icon, and choose from the resulting list
of available hotspots. Granted, you can find third-party connection managers for Vista, but
nothing this streamlined and unobtrusive.

14
INTRANET E-MAIL SYSTEM

ORGANIZATIONAL
PROFILE
D’Soft Solutions is a Software Development and Research Centre of De Paul Education
Trust, a registered charitable Trust of the Vincentian fathers who are committed to the integral
development of the less privileged members of the society. It has long years of sound
experience in software development field.

D’Soft Solutions has the prime objective of supplying efficient software solutions to
various enterprises to make the best use of the offerings of Information Technology. It is
organized in such a way as to provide customized and tailored solutions to specific industries,
business concerns and other service institutions. The qualified and experienced personnel will
provide training for operating the software and our after sale service is guaranteed.

15
INTRANET E-MAIL SYSTEM

PROBLEM DEFINITION

4.1. PROBLEM DEFINITION


The first step in system study is to identify particular problem to be solved or
the tasks to be accomplished and setting the system goals to be achieved after defining16the
INTRANET E-MAIL SYSTEM
problem, the goals of the project are reviewed which has to be fulfilled in order to complete it
successfully.
Commencement of my project was done with an objective of developing an
application which reduces the work load and increases the system performance.

4.2 EXISTING SYSTEM


The Existing system of communication the data transfer between the different
individuals of the organization in conducting the works for the company is a cost effective and
not a reliable architecture where even the security standards are very low. In the traditional 2-tier
architecture there existed only the server and the client. In most cases the server was only a data
base server that can only offer data. Therefore majority of the business logic i.e., validations etc.
had to be placed on the clients system. This makes maintenance expensive. Such clients are called
as ‘fat clients’. This also means that every client has to be trained as to how to use the application.

The current Intranet E-mail system does not provide the features like blocking the
other users from sending the E-mails. Also doesn’t have the mail acknowledgment system, by
using the acknowledgment system a mail is automatically generated when you view the mail
received.

4.3 PROPOSED SYSTEM

The proposed system is intended to overcome the main drawbacks


exhibited by the existing system. The system named “INTRANET E-MAIL SYSTEM” is a
web application which provide the simple and easy user interface. Intranet E-mail system is
E-mail system which works in organizations or institutions for the communication between
the employees of the same.

The proposed system include the facilities like mail acknowledgment


system, log maintains of the users who accessed the system. The user creation is provided for
the public as well as the administrators. The administrator has the power to reset the passwords,
remove the accounts, and manage the users of the system. The proposed system is more
concentrated on the security features of the web application. 17
INTRANET E-MAIL SYSTEM
The benefits of the proposed system:

The proposed system supports a wide range of features, some of them are:

 Auto mail Acknowledgment system.


 Simple.
 User friendly.
 Easier handling and flexibility
 Use of new technology
 System is highly secure.
 Block existing user.
 Dynamic account management.
 Auto Login - Logout activity log maintains.

4.4 FEASIBILITY STUDY


During the system analysis a feasibility study of proposed system carried out to see
whether it was beneficial to the organization. Three key considerations are involved and
results are :

 4.3.1 TECHNICAL FEASIBILITY


 Does the necessary technology exist to do what is been suggested.
 Does the proposed equipment have the technical capacity for using the new
system
 Are there technical guarantees of accuracy, reliability and data security?
 The environment requires in the development of the system is any windows
platform.
 The observer pattern along with factory pattern will update the results
eventually.
 Around existing environment and to what extend it can support the proposed
system. While considering the technical factors of the organization that it
presently have is sufficient to implementation of the new system.

18
INTRANET E-MAIL SYSTEM
 4.3.2 OPERATIONAL FEASIBILITY
Question that going to be risen in the operational feasibility are:

 Will the system be used if it developed and implemented.


 If there was sufficient support for the project from the management and from the
users.
 Have the users been involved in planning and development of the Project.
 Will the system produce poorer result in any respect or area?

This system can be implemented in the organization because there is adequate support from
management and users. Being developed in ASP.NET using C# so that the necessary operations
are carried out automatically.

 4.3.3 ECONOMICAL FEASIBILITY

The system developed and installed will be good benefit to the organization.
The system will be developed and operated in the existing hardware and software infrastructure.
So there is no need of additional hardware and software for the system. The System developed
can reduce the cost overheads of the organization in providing the internet services for
establishing the communication channel between the organization staff in conducting the
organizational works in smoother and time effective manner.

19
INTRANET E-MAIL SYSTEM

SYSTEM REQUIREMENT
SPECIFICATION

5.1 SOFTWARE SPECIFICATION


The software for the development of proposed system is as follows. The software for
the development has been selected based on several functions such as:-

 Support
20
INTRANET E-MAIL SYSTEM
 Cost effectiveness

 Development speed

 Ability to rub out application in the least time

 Stability

 Reliability

 Accuracy

Operating system : Windows 7 Professional

Front end : ASP. NET 2010 (C#)

Back end : SQL SERVER 2008

5.2 HARDWARE SPECIFICATION


Processor : Intel Pentium IV or above

Memory : 10 GB

Ram : 512 MB

Keyboard : 104 keys

Monitor : 15'' Monitor

Printer : Dot Matrix

Mouse : Standard PS/2

Network : 100MB Local Area Network.

21
INTRANET E-MAIL SYSTEM

DESIGN TOOL

6.1 DATA FLOW DIAGRAM

LEVEL-0

22
INTRANET E-MAIL SYSTEM

LEVEL – 1

LEVEL – 2 FOR USER

23
INTRANET E-MAIL SYSTEM

LEVEL – 2 FOR ADMINISTRATOR


24
INTRANET E-MAIL SYSTEM

25
INTRANET E-MAIL SYSTEM

SYSTEM DESIGN

7.1 INTRODUCTION
26
INTRANET E-MAIL SYSTEM
The most creative and challenging phase of the system development is system
design, is a solution to how to approach to the creation of the proposed system. It refers to the
technical specification that will be applied. It provides the understanding and procedural details
necessary for implementing the system recommended in the feasibility study. Design goes
through the logical and physical stages of development. At an early stage in designing a new
system, the system analyst must have a clear understanding of the objectives, which the design
is aiming to fulfill. The first step is to determine how the output is to be produced and in what
format. Second input data and master files (database) have to be designed to meet the
requirements of the proposed output. The operational (processing) phases are handled through
program construction and testing.

The system design includes

 Modularization
 Database design
 Input design
 Output design

7.2 MODULARIZATION

Structured design partitions a program into small, independent modules. They are
arranged in a hierarchy that approximates a model of the business area and is organized in a top-
down manner. Structured design is an attempt to minimize complexity and make a problem
manageable by subdividing it into smaller segments, which is called modularization or
decomposition. The primary advantage of this design is as follows:

 Critical interfaces are tested first.


 Early versions of the design, though incomplete, are useful enough to resemble the real
system
 Structuring the design provides control and improves morale.
 The procedural characteristics define the order that determines processing.
Modules that perform only one task are said to be less error-prone than modules that
perform multiple tasks. 27
INTRANET E-MAIL SYSTEM
Modules of Intranet E-mail system are as follows:

1. User registration and Login


2. Composing and sending mails.
3. Receiving mails.
4. Mail Acknowledgment System.
5. Showing received mail details.
6. Replay and Forward mails
7. Saving the mail in the form of Draft.
8. Deleting mails.
9. Recovery of Password.
10. Address book maintenances.
11. User management.
12. Login-Logout activity Log maintenance.
13. Block Existing user.
14. Dashboard information.
1. USER REGISTRATION AND LOGIN MODULE.

 Users can register and sign in here. For registration, member has to provide personal
details, address details, account details and they have to agree with policies.
 Member can sign in by providing their account details (Username and password).
 Administrators can add new users with limited information. These users will be verifying
their information given at the time of their first login.

2. COMPOSING AND SENDING MAILS.

 By making use of this module, Members can compose and send mails. Many features have
been provided to users so that they can 1) send attachments 2) Acknowledgment mail
Reception
 User will get an Acknowledgement when the receiver opens the mail if the sender requires
option given for the selection of the requirement.

28
INTRANET E-MAIL SYSTEM
3. RECEIVING MAILS.

 In this module the users will be able to see the mails that they received.
 Received mail can be forwarded.
 Separation in viewed mails and unviewed.

4. SHOWING THE RECEIVED MAIL DETAILS.

 The details about the mails received will be given to the user.
 Details includes 1)The sender mail address, 2) Time and Date that the mail sent,
3) IP address of the sender. Etc.

5. SAVING THE MAIL IN THE FORM OF DRAFT.

 The mail can be saved as Draft and can be sent later.


 Draft mails are saved separately.

6. DELETING MAILS.

 The mails received/ sent can be deleted.


 The deleted mails can be found in the Trash. Thrashed mails can be permanently deleted
later.

7. RECOVERY OF PASSWORD.

 The password of the can be recovered if not able to login.


 The Recovery of the password is based on the Security question asked while registration.
 If the above attempt fails the user can request administrator for resetting the password.
The administrator after the verification and conformation will reset the password and at
the login time the system will ask to change the password.

8. ADDRESS BOOK MAINTENANCES.


29
INTRANET E-MAIL SYSTEM

 The mail contacts that are sent and received will be added to the users contact book
automatically.
 While sending the mail users can choose receivers address from the contact list.

9. ADMINISTRATOR MANAGEMENT.

 Admin is a super user and hence responsible for a) Site Maintenance, b) User
Management, c) Mails Management and d) Resetting the Password e) Creating New User
f) Role management.
 The Administrator can reset the password of any user registered in the system.
 Administrator can view the Activity log of each users of the system.
 Administrator will know the users online as well as inactive users in the Intranet E-mail
system.
 Administrator has the power to delete the users.

10. MAIL ACKNOWLEDGMENT SYSTEM

 This system ensures that is the receiver view the mail, the sender will come to know by
getting an automated acknowledged mail along with the time and IP address of the
system.
 The sender need to check the option of receiving auto acknowledgment on particular mail
while sending.

11. BLOCK USERS.

 The user can block other users in the address book.


 After blocking a particular user that user will not be able to send any mails to the user
who blocked.

7.3 INPUT DESIGN


30
INTRANET E-MAIL SYSTEM
Input design is the process of converting user-oriented inputs to computer based
format. It also includes determining the record media, method of input, speed of capture,
and entry into system. Inaccurate input data are the most common cause of errors in
data processing.

Errors entered by the user can be controlled by input design and control checking.
Input design is the process of converting user originated inputs to a computer based
format. In the system design phase the Data Flow Diagram (DFD) identifies logical data
flows, data stores, source and destinations.

A system flow chart specifies master files (Data Base) transaction files and
computer programs. Input data are collected and organized into groups of similar data.

7.4 OUTPUT DESIGN


The outputs can be in the form of operational documents and lengthy reports. The
input records have to be validated, edited, organized and accepted by the system before
being processed to produce outputs. The most important and direct source of information
to user efficient ,intelligible output design should improve the systems relationship with
the user and help in decision making. A major form of output is hard copy from the
printer. Printouts should be designed around the output requirements of the user. The
output devices to consider depends on the factors such as compatibility of the device
with the system response time requirements, expected print quantity and quality
requirements, expected print quantity and quality.

7.5 DATABASE DESIGN


Data Base design is the logical form of design of data storage in the form of records
in a particular structure in the form of tables with fields which is

not transparent to the normal user but it actually act as the backbone of the system.
As we know database is a collection of which helps the system to manage and store
31
INTRANET E-MAIL SYSTEM
data is called database management system. Data base management system builds some
form of constraints like integrity constraints, i.e., the primary key or unique key and
referential integrity which help to keep data structure storage and access of data from
tables efficiently and accurately and take necessary steps to concurrent access of data
and avoid redundancy of data in tables by normalization criterions.

Normalization is the method of breaking down complex table structures


into simple table structures by using certain rules thus reduce redundancy and
inconsistency and disk space usage and thus increase the performance of the system
or application which is directly linked to the database design and also solve the
problems of anomalies.

There are different forms of normalization, some are:

 First normal form (1NF)

 Second normal form (2NF)

 Third normal form (3NF)

 Boyce Codd normal form

 Forth normal form (4NF)

 Fifth normal form (5NF)

The data base design of the new system is in second normal form and every non key
attribute is functionally depend only on the primary key. The master and transaction
tables and their structure are shown below.

Table: reg_user
Description: Registration of New user or Administrator.

32
INTRANET E-MAIL SYSTEM
FIELD CONSTRAINTS DATATYPE DESCRIPTION
skyid Primary key bigint User Id
fname varchar(50) First name of the user
mname varchar(50) Middle Name of the user
lname varchar(50) Last Name of the user
uname varchar(50) Username of the user
passwd varchar(50) Password of the User
resetpasswd varchar(50) Reset password
resetflag int Flag of Reset password or not
gender char(1) Gender of the user
dob date Date of birth of the user
sec_mail Varchar(50) Secondary E-mail Id of User
country_id Foreign key(country) int Country id
state_id Foreign key(state) int State id
mob_no bigint Mobile number of the user
sec_que_id Foreign int Security question id
key(security_question)
sec_que_ans varchar(50) Security question answer
date_created date Date account created
date_lastlogin datetime Date last login
user_dp varbinary(MAX) Display image of the user
status int Status of the user(deleted or
active)
cnt_status int Current status(online or offline)
ck_at_fst_login int Verify user information flag
role int Role of the user(Admin or User)

Table: Mails
Description: Mails send, received, trashed and saved and mails information.

33
INTRANET E-MAIL SYSTEM
field CONSTRAINTS DATATYPE DESCRIPTION
mid Primary Key bigint Mail Id
rec_id Foreign key(reg_user) bigint Id of the receiver
sen_id Foreign key(reg_user) bigint Id of the sender
sub varchar(100) Subject of the mail
msg text Mail contents
msgdate datetime Mailed date
sen_ip varchar(50) IP of the sender
att_id Foreign key(attach_mail) Int Attachment id
reader_date datetime Mail read date
read_ack Int Need acknowledgment(1 or 0)
read_ip varchar(50) IP of the Reader
mail_pos_status Int Mail position (inbox, trash, sent
etc.)
sen_trashed Int Sender trashed mail(1 or 0)
rec_trashed Int Receiver trashed mail(1 or 0)
sen_per_delete Int Sender permanently deleted(1 or
0)
rec_per_delete Int Receiver permanently deleted(1
or 0)
del_date datetime Date trashed
temp_rec_id varchar(50) Temporary receiver id

Table: Country
Description: Country Name.

34
INTRANET E-MAIL SYSTEM
field CONSTRAINTS DATATYPE DESCRIPTION
country_id Primary Key bigint Country id
country_name varchar(50) Country name

Table: State
Description: State Name.

field CONSTRAINTS DATATYPE DESCRIPTION


state_id Primary Key bigint State id
state_name varchar(50) State name

Table: Security_Question
Description: Security questions for the password recovery.

field CONSTRAINTS DATATYPE DESCRIPTION


sec_que_id Primary Key Int Security Question id
sec_question varchar(60) Security Question

Table: Block_mail
Description: Blocked users and blocked by user information.

field CONSTRAINTS DATATYPE DESCRIPTION


block_id Primary Key bigint Block id
skyid Foreign key(reg_user) bigint Blocked id
blocked_by Foreign key(reg_user) bigint Blocker id

Table: attach_mail
35
INTRANET E-MAIL SYSTEM
Description: Blocked users and blocked by user information.

field CONSTRAINTS DATATYPE DESCRIPTION


att_id Primary Key bigint Attachment id
file_name varchar(200) File name
file_size bigint File size
file_cont varbinary(MAX) File contents
file_type varchar(100) File type

Table: skymail_gsettings
Description: settings of the web applications.

field CONSTRAINTS DATATYPE DESCRIPTION


set_id Primary Key bigint Settings Id
create_user Foreign Key(reg_user) int Settings created id
inactive_from_date date Date from when inactive
no_mails_page int Number of mails displayed /page
show_welcome_msg int Show welcome message(1 or 0)
msg_header varchar(50) Message header text
msg_body varchar(500) Message body
sent_by Foreign Key(reg_user) bigint Message created by
msg_ip varchar(50) Message created IP

Table: skymail_removed
Description: removed account and removal information.

36
INTRANET E-MAIL SYSTEM
field CONSTRAINTS DATATYPE DESCRIPTION
rid Primary Key bigint Removal Id
skyid Foreign Key(reg_user) bigint Removed account id
rm_date datetime Removed date and time
rm_reason varchar(100) Reason behind the removal
rm_by bigint Removed by id

Table: user_session_info
Description: User’s Session informations.

field CONSTRAINTS DATATYPE DESCRIPTION


usid Primary Key Bigint Session id
skyid Foreign Key(reg_user) Bigint User id
login_ip varchar(50) IP of the login system
datetime_login Datetime Date and time of login
datetime_logout Datetime Date and time of logout
browser_name varchar(25) Name of the browser
browser_version varchar(50) Version of the browser
os_platform varchar(50) Operating System platform

37
INTRANET E-MAIL SYSTEM

SYSTEM TESTING

8.1 SOFTWARE TESTING

Software testing is the critical aspect of software quality assurance and represents the ultimate
review of specification, design and coding. Testing is the process of running the program with
38
INTRANET E-MAIL SYSTEM
the explicit intention of finding an error. Testing is vital to the success of the system. During
testing the system is used experimentally to ensure that the software does not fail. That is, it
will run according to its specifications and in the way user expects too. The system is tested
with special test data and the results are examined for their validity.

CODE TESTING

The code testing strategy examines the logic of the program. To follow this method, the
analyst develops test cases that result in executing every instruction in the program or module.

UNIT TESTING

Unit testing can be performed from the bottom up, starting with the smallest and
lowest level modules and routines that are assembled and integrated to perform a
specific function.

SYSTEM TESTING

It tests the integration of each module in the system. It also tests to find discrepancies
between the system and its original objective. In this testing analysis we are trying to
find areas where modules have been designed with different specification for data
length, type etc.

VALIDATION TESTING

Validation succeeds when the software functions in which the user expects.
Validation refers to the process of using software in a live environment in order to find errors.
During the course of validating the system, failure may occur and sometimes the coding has
to be changed according to the requirement.

OUTPUT TESTING

The system should produce the required output is on screen and in printed format. The output
39
INTRANET E-MAIL SYSTEM
format on the screen is to be format that designed in the system design phase according to
user needs. For the hard copy also, the output comes out as the specified requirements by the
user.

ACCEPTANCE TESTING

User acceptance of a system is the factor for the success of any system. If the
users of the system cannot digest the nature of the system, the project would fail.

 Input screen testing


 Output screen testing

Preparation of testing data plays a vital role in the system testing. After preparing the test data
the system under study is tested using the test data. While testing the system, errors are again
uncovered and corrected by using the above testing steps. Also, it is ideal to note the
corrections for future use. The proposed system is tested and finds better results in all the
above system tests.

40
INTRANET E-MAIL SYSTEM

SYSTEM IMPLEMENTATION

9.1 SYSTEM IMPLEMENTATION

A crucial phase in the system life cycle is the successful


implementation of the new system design. Implementation simply means converting a new
41
INTRANET E-MAIL SYSTEM
system design into operation. This involves creating computer compatible files, training,
and telecommunication network before the system is up and running. A crucial factor
in conversion is not disrupting the functioning of organization. Actual data were input
into the program and the working of the system was closely monitored. It is a process
of converting a new or revised system into an operational one. It is the essential stage
in achieving a successful new system because usually it involves a lot of upheaval in
the user. It must therefore be carefully planned and controlled to avoid problems.

The implementation phase involves the following tasks:

1. Careful planning.

2. Investigation

3. Design of methods

4. Training of the staff in the changeover phase.

5. Evaluation of changeover.

We implemented this new system in parallel run plan without making


any disruptions to the ongoing system ,but only computerizing the whole system to
make the work, evaluation and retrieval of data easier, faster and reliable.

9.2 IMPLEMENTATION PLAN

System implementation is the process of making the newly designed


system fully operational and consistent in performance. After the initial design, the system
is made published on the internet and the end user can do demonstration. The logical miss-
working the system can be identified if any. Various combinations of test data were feed.

Each process accuracy/reliability checking was made. After the approval, the system was
implemented in the user department.
42
INTRANET E-MAIL SYSTEM
The preparation of implementation of documentation process is often viewed as total sum of
the software documentation process. In a well-defined software development environment,
however the presentation of implementation documents is essentially an interactive process
that synthesis and recognizes document items that were produced during the analysis and
design phase for the presentation to user. The following are the three types of implementation
documents.

 Conversion Guide
 User Guide
 Operation Guide

CONVERSION GUIDE

The conversion guide phase of the implementation, process the tasks that are required
to place the system into an operation mode. They amplify the conversion lane that was
defined during the internal design phase and defines file conversion, file creation and
data entry requirements.

USER GUIDE

The system application and operation functions describes the overall performance
capabilities of the system and define procedures the user must follow to operate the
system. In the realm of information system, the content of a user guide must be
developed to coincide with a criterion that defines the characteristics of one of the
following methods of data processing

 Off-line processing
 Direct access processing

OPERATION GUIDE

43
INTRANET E-MAIL SYSTEM
The function of an operation is to define the control requirements of a system and
provide instruction for initializing, running and terminating the system. The items
contained in an operation guide may be grouped as follows.

 General information
 System overviews
 Run description

44
INTRANET E-MAIL SYSTEM

MAINTENANCE AND REVIEW

45
INTRANET E-MAIL SYSTEM
MAINTENANCE AND REVIEW
Maintenance is making adaptation of the software for external changes (requirements changes
or enhancements) and internal changes (fixing bugs). When changes are made during the
maintenance phase all preceding steps of the model must be revisited. There are three types
of maintenance:

1. Corrective (Fixing Bugs / errors).


2. Adaptive (Updates due to environment changes).
3. Perfective (Enhancements, requirements changes.

46
INTRANET E-MAIL SYSTEM

CONCLUSION

47
INTRANET E-MAIL SYSTEM
It has been a great pleasure for me to work on this exciting and challenging project. This
project proved good for me as it provided practical knowledge of not only programming in
ASP.NET and C#.NET web based application and no some extent Windows Application and SQL
Server, but also about all handling procedure related with “INTRANET E-MAIL SYSTEM”.
It also provides knowledge about the latest technology used in developing web enabled
application and client server technology that will be great demand in future. This will provide
better opportunities and guidance in future in developing projects independently.

BENEFITS:

The project is identified by the merits of the system offered to the user. The merits of this project
are as follows: -

 It’s a web-enabled project.


 This project offers user to enter the data through simple and interactive forms. This is very
helpful for the client to enter the desired information through so much simplicity.
 The user is mainly more concerned about the validity of the data, whatever he is entering.
There are checks on every stages of any new creation, data entry or updation so that the user
cannot enter the invalid data, which can create problems at later date.
 Sometimes the user finds in the later stages of using project that he needs to update some of
the information that he entered earlier. There are options for him by which he can update the
records. Moreover there is restriction for his that he cannot change the primary data field.
This keeps the validity of the data to longer extent.
 User is provided the option of monitoring the records he entered earlier. He can see the desired
records with the variety of options provided by him.
 From every part of the project the user is provided with the links through framing so that he
can go from one option of the project to other as per the requirement. This is bound to be
simple and very friendly as per the user is concerned. That is, we can say that the project is
user friendly which is one of the primary concerns of any good project.
 Data storage and retrieval will become faster and easier to maintain because data is stored in
a systematic manner and in a single database.

48
INTRANET E-MAIL SYSTEM
 Decision making process would be greatly enhanced because of faster processing of
information since data collection from information available on computer takes much less
time than manual system.
 Easier and faster data transfer through latest technology associated with the computer and
communication.
 Through these features it will increase the efficiency, accuracy and transparency,

LIMITATIONS:

 The size of the database increases day-by-day, increasing the load on the database back up
and data maintenance activity.
 Training for simple computer operations is necessary for the users working on the system.
 This is an Intranet based application.

49
INTRANET E-MAIL SYSTEM

APPENDIX

50
INTRANET E-MAIL SYSTEM
12.1 SAMPLE CODE
view_mail.aspx

using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Web;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingskymail.mail.mail_class;
usingSystem.Data;
usingSystem.Web.Security;
usingskymail.skymail_class;
usingSystem.Drawing;
usingSystem.Security.Cryptography;

namespaceskymail.mail.u
{
publicpartialclassview_mail : System.Web.UI.Page
{
MailClass mc = newMailClass();
MailClass2 mc2 = newMailClass2();
skymail_main_classsmc=newskymail_main_class ();
stringsys_date = DateTime.Now.ToString("yyyy-MM-ddhh:mm:sstt");
stringsystem_date = DateTime.Now.ToString("dd-MM-yyyyhh:mm:sstt");
string mid;
DataTabledt = newDataTable();
int flag;
publicvoidattachment_show()
{
ImageButton2.CommandArgument = dt.Rows[0]["att_id"].ToString();
if (Convert.ToInt32(dt.Rows[0]["att_id"]) != 0)
{
DataTable table = newDataTable();
table = smc.down_attach(Convert.ToInt32(dt.Rows[0]["att_id"]));
Literal1.Text = table.Rows[0]["file_name"].ToString();
if (table.Rows[0]["file_type"].ToString() == "application/pdf")
{
Panel1.Visible = true;
att_type_img.Visible = true;
att_type_img.ImageUrl = "~/mail/u/Images/pdf.png";
}
if (table.Rows[0]["file_type"].ToString() == "application/octet-stream")
{
Panel1.Visible = true;
att_type_img.Visible = true;
att_type_img.ImageUrl = "~/mail/u/Images/rar.png";
}
if (table.Rows[0]["file_type"].ToString() == "application/vnd.openxmlformats-
officedocument.wordprocessingml.document")
{
Panel1.Visible = true;
att_type_img.Visible = true;
att_type_img.ImageUrl = "~/mail/u/Images/doc.png";
}
if (table.Rows[0]["file_type"].ToString() == "image/jpeg")
{
Panel1.Visible = true; 51
INTRANET E-MAIL SYSTEM
att_type_img.Visible = true;
att_type_img.ImageUrl = "~/mail/u/Images/jpg.png";
}
if (table.Rows[0]["file_type"].ToString() == "audio/mp3")
{
Panel1.Visible = true;
att_type_img.Visible = true;
att_type_img.ImageUrl = "~/mail/u/Images/mp3icon.png";
}
if (table.Rows[0]["file_type"].ToString() == "audio/x-m4a")
{
Panel1.Visible = true;
att_type_img.Visible = true;
att_type_img.ImageUrl = "~/mail/u/Images/m4a.png";
}
if (table.Rows[0]["file_type"].ToString() == "video/mp4")
{
Panel1.Visible = true;
att_type_img.Visible = true;
att_type_img.ImageUrl = "~/mail/u/Images/mp4.png";
}
Literal1.Visible = true;
ImageButton2.Visible = true;
}
}
protectedvoidPage_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["previous"] = Request.UrlReferrer;
}
if (smc.get_Admin(HttpContext.Current.User.Identity.Name.ToString()) == 1 &&subject.Text ==
"Password Reset")
{
LinkButton1.Visible = true;
}
if (HttpContext.Current.User.Identity.Name.ToString() != "")
{
if (Request.QueryString["mid"] != null)
{
try
{
stringskyid = HttpContext.Current.User.Identity.Name.ToString();
mid = mc.mailidDecript(Request.QueryString["mid"].Replace(" ", "+"));
mail_address.Font.Bold = true;
mail_address1.Font.Bold = true;
if (Session["status"] != null)
{
replay.Visible = false;
dt = mc.viewmail(mid);
string sub = dt.Rows[0]["sub"].ToString();
if (sub == string.Empty)
{
sub = "[ No Subject ]";
}
subject.Text = sub;

from.Text = "Me ";

mail_address1.Text = "[" +
mc.get_sender_uname(dt.Rows[0]["rec_id"].ToString()) + "]"; 52
INTRANET E-MAIL SYSTEM
to.Text = mc.get_sender_address(dt.Rows[0]["rec_id"].ToString());
DataTabledatatable = newDataTable();
datatable = smc.get_sec_user(dt.Rows[0]["sen_id"].ToString());
if (datatable.Rows[0]["user_dp"] != DBNull.Value)
{
u_image.ImageUrl = "ImageHandler.ashx?id=" + dt.Rows[0]["sen_id"].ToString();
}
else
{
u_image.ImageUrl = "~/User_dp/default.png";
}
date.Text = dt.Rows[0]["msgdate"].ToString();
sen_ip.Text = dt.Rows[0]["sen_ip"].ToString();
msg.Text = dt.Rows[0]["msg"].ToString().Replace("\n", "<br>");
attachment_show();
}
else
{
dt = mc.viewmail(mid);
if (dt.Rows[0]["sub"].ToString() != "")
{
if (dt.Rows[0]["sub"].ToString().Trim().Substring(0, 3) == "ACK")
{
replay.Visible = false;
forward.Visible = false;
}
}

mc.set_read_status(mid);
string sub = dt.Rows[0]["sub"].ToString();
if (sub == string.Empty)
{
sub = "[ No Subject ]";
}
subject.Text = sub;
mail_address.Text = " [" + mc.get_sender_uname(dt.Rows[0]["sen_id"].ToString()) + "]";
from.Text = mc.get_sender_address(dt.Rows[0]["sen_id"].ToString());
DataTabledatatable = newDataTable();
datatable = smc.get_sec_user(dt.Rows[0]["sen_id"].ToString());
if (datatable.Rows[0]["user_dp"] != DBNull.Value)
{
u_image.ImageUrl = "ImageHandler.ashx?id=" + dt.Rows[0]["sen_id"].ToString();
}
else
{
u_image.ImageUrl = "~/User_dp/default.png";
}
to.Text = "me.";
date.Text = dt.Rows[0]["msgdate"].ToString();
sen_ip.Text = dt.Rows[0]["sen_ip"].ToString();
msg.Text = dt.Rows[0]["msg"].ToString().Replace("\n", "<br>");
attachment_show();
int status = mc.auto_response_status(mid);
int id;
if (!IsPostBack)
{
if (status == 1)
{
if (Convert.ToInt32(dt.Rows[0]["att_id"]) != 0)
{
id = Convert.ToInt32(dt.Rows[0]["att_id"]); 53
INTRANET E-MAIL SYSTEM
}
else
{
id = 0;
}
string msg1 = "Auto Generated Mail<br><br>You to <b>" +
mc.get_sender_address(dt.Rows[0]["rec_id"].ToString()) + "</b><br><br><b>" + '"' + msg.Text +
'"' + "</b><br><br>Sent on " + date.Text + "<br><br>The Mail Have been seen by the " +
mc.get_sender_address(dt.Rows[0]["rec_id"].ToString()) + " on " + system_date;
if (smc.send_mail(dt.Rows[0]["sen_id"].ToString(), dt.Rows[0]["rec_id"].ToString(), "ACK: Mail
Read Info (" + dt.Rows[0]["sub"].ToString() + ")", msg1, sys_date.ToString(), smc.get_ip(),
id.ToString(), "0", "1"))
{
mc.update_auto_response_status(mid);
}
}
}
}
}
catch (IndexOutOfRangeException)
{
Response.Redirect("javascript:history.back(); return false;");
}
catch (CryptographicException)
{
Response.Redirect("javascript:history.back(); return false;");
}
catch (FormatException)
{
Response.Redirect("javascript:history.back(); return false;");
}
}
else
{
Response.Redirect("mail-user-home.aspx");
}
}
else
{
Response.Redirect("~/login.aspx");
}
}

protectedvoid replay_Click1(object sender, EventArgs e)


{
replay_text.Visible = true;
replay_text.Text = "";
litto.Visible = false;
fwd_to.Visible = false;
replay_send.Visible = true;
read_ack.Visible = true;
cancel_send.Visible = true;
Session["flag"] = 0;
}
protectedvoidreplay_send_Click(object sender, EventArgs e)
{
flag = Convert.ToInt32(Session["flag"]);
intack;
stringr_sub;
stringsys_ip = smc.get_ip();
stringuname = HttpContext.Current.User.Identity.Name.ToString(); 54
INTRANET E-MAIL SYSTEM
int id = 0;
intmail_pos = 1;
if (read_ack.Checked)
{
ack = 1;
}
else
{
ack = 0;
}
if (flag == 0)
{
stringrec_id = dt.Rows[0]["sen_id"].ToString();
if (mc2.get_check_blocked(HttpContext.Current.User.Identity.Name.ToString(), rec_id)) {
litto.Text = "You Can't Sent mails to this User";
litto.Visible = true;
litto.ForeColor = Color.Red;
block_details.Visible = true;
}
else
{
if (dt.Rows[0]["sub"].ToString().Trim().Substring(0, 2) != "RE")
{
r_sub = "RE" + ":"+ " " + dt.Rows[0]["sub"].ToString();
}
else
{
r_sub = dt.Rows[0]["sub"].ToString();
}
if (smc.send_mail(rec_id, uname, r_sub, replay_text.Text, sys_date, sys_ip, id.ToString(),
ack.ToString(), mail_pos.ToString()))
{
Session["info"] = "Mail Sent!";
Response.Redirect("mail-user-home.aspx");
}
else
{
ClientScript.RegisterStartupScript(Page.GetType(), "ShowMessage", "<script
language='javascript'>alert('Unable to Send!')</script>");
}
}
}
if (flag == 1)
{
if (Convert.ToInt32(dt.Rows[0]["att_id"]) != 0 &&att_name.Visible==true)
{
id = Convert.ToInt32(dt.Rows[0]["att_id"]);
}
else
{
id = 0;
}
if (fwd_to.Text == "")
{
ClientScript.RegisterStartupScript(Page.GetType(), "ShowMessage", "<script
language='javascript'>alert('Specify To Address!')</script>");
}
else
{
DataTabledat = newDataTable();
dat = smc.getuser_data(fwd_to.Text); 55
INTRANET E-MAIL SYSTEM

r_sub = fwd_sub.Text;
if (dat.Rows.Count> 0)
{
if (mc2.get_check_blocked(HttpContext.Current.User.Identity.Name.ToString(),
dat.Rows[0]["skyid"].ToString()))
{
litto.Visible = true;
litto.Text = "You Can't Sent mails to this User";
block_details.Visible = true;
litto.ForeColor = Color.Red;
}
else
{
stringfwdrec_id = dat.Rows[0]["skyid"].ToString();
if (smc.send_mail(fwdrec_id, uname, r_sub, replay_text.Text, sys_date, sys_ip, id.ToString(),
ack.ToString(), mail_pos.ToString()))
{
Session["info"] = "Mail Sent!";
Response.Redirect("mail-user-home.aspx");
}
else
{
ClientScript.RegisterStartupScript(Page.GetType(), "ShowMessage", "<script
language='javascript'>alert('Unable to Send!')</script>");
}
}
}
else
{
ClientScript.RegisterStartupScript(Page.GetType(), "ShowMessage", "<script
language='javascript'>alert('Invalid Mail Address!')</script>");
}
}
}
}

protectedvoidforward_Click(object sender, EventArgs e)


{
replay_text.Visible = true;
replay_send.Visible = true;
read_ack.Visible = true;
cancel_send.Visible = true;
fwd_to.Visible = true;
fwd_sub.Visible = true;
fwd_edit.Visible = true;
litto.Visible = true;
litto.Text = "To";
litto.ForeColor = Color.Black;
if (Convert.ToInt32(dt.Rows[0]["att_id"]) != 0)
{
DataTable table = newDataTable();
table = smc.down_attach(Convert.ToInt32(dt.Rows[0]["att_id"]));
att_name.Text = table.Rows[0]["file_name"].ToString().ToLower();
att_fwd_close.Visible = true;
att_name.Visible = true;
att_name.ForeColor = Color.Blue;
ImageButton2.Visible = true;
}
if (dt.Rows[0]["sub"].ToString().Trim().Substring(0, 3) != "FWD")
{ 56
INTRANET E-MAIL SYSTEM
fwd_sub.Text = "FWD" + ":"+ " " + dt.Rows[0]["sub"].ToString();
}
else
{
fwd_sub.Text = dt.Rows[0]["sub"].ToString();
}
if (Session["status"] != null)
{
stringstr= msg.Text.Replace("<br>", "\n");
replay_text.Text = "-----FORWARDED MAIL------\n" + "From: " +
mc.get_sender_address(HttpContext.Current.User.Identity.Name.ToString()) + " [" +
mc.get_sender_uname(HttpContext.Current.User.Identity.Name.ToString()) + "]\nTo: " + to.Text +
mail_address1.Text + "\nOn: " + date.Text + "\n\n" + str;
}
else
{
stringstr=msg.Text.Replace("<br>", "\n");
replay_text.Text = "-----FORWARDED MAIL------\n" + "From: " + from.Text + mail_address.Text +
"\n" + "To: " + mc.get_sender_address(dt.Rows[0]["rec_id"].ToString()) + "[" +
mc.get_sender_uname(HttpContext.Current.User.Identity.Name.ToString()) + "]" + "\n" + "On: " +
date.Text + "\n\n" + str;
}
Session["flag"] = 1;
}
protectedvoidcancel_send_Click(object sender, EventArgs e)
{
replay_text.Visible = false;
replay_send.Visible = false;
read_ack.Visible = false;
cancel_send.Visible = false;
litto.Visible = false;
fwd_to.Visible = false;
att_name.Visible = false;
att_fwd_close.Visible = false;
fwd_sub.Visible = false;
fwd_edit.Visible = false;
}
protectedvoid ImageButton2_Click(object sender, ImageClickEventArgs e)
{
intatt_id = Convert.ToInt32(ImageButton2.CommandArgument);
if (att_id != 0)
{
DataTabledata_attachment = newDataTable();
data_attachment = smc.down_attach(att_id);
Response.Clear();
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = data_attachment.Rows[0]["file_type"].ToString();
Response.AppendHeader("Content-Disposition", "Attachement;Filename=" +
data_attachment.Rows[0]["file_name"].ToString());
Response.BinaryWrite((byte[])data_attachment.Rows[0]["file_cont"]);
Response.Flush();
Response.End();
}
}
protectedvoid ImageButton1_Click(object sender, ImageClickEventArgs e)
{
if (ViewState["previous"] != null)
{
Response.Redirect(ViewState["previous"].ToString()); 57
INTRANET E-MAIL SYSTEM
}
}
protectedvoidatt_type_img_Click(object sender, ImageClickEventArgs e)
{
ImageButton2_Click(sender,e);
}
protectedvoidatt_fwd_close_Click(object sender, ImageClickEventArgs e)
{
att_name.Visible = false;
att_fwd_close.Visible = false;
}
protectedvoidfwd_edit_Click(object sender, EventArgs e)
{
fwd_sub.Enabled = true;
}
protectedvoidblock_details_Click(object sender, EventArgs e)
{
litto.Visible = true;
block_details.Visible = false;
litto.ForeColor = Color.Red;
litto.Text = "The User has Blocked your mails!";
}
protectedvoidPrint_Click(object sender, ImageClickEventArgs e)
{
Session["ctrl"] = printpanel;
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script
language=javascript>window.open('Print.aspx','PrintMe','height=300px,width=300px,scrollbars=1')
;</script>");
}
protectedvoiddelete_mail_Click(object sender, ImageClickEventArgs e)
{
if (Session["status"] != null)
{
mc.delete_mail_sen(mid);
Session["view_delete"] = mid;
Session["info"] = "Mail Deleted!";
Response.Redirect("send_mail.aspx");
}
else
{
mc.delete_mail_rec(mid);
Session["view_delete"] = mid;
Session["info"] = "Mail Deleted!";
Response.Redirect("mail-user-home.aspx");

}
}
}
}

mail_user_home.aspx
using System;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Web;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingskymail.skymail_class;
usingSystem.Data;
usingSystem.Web.Security; 58
INTRANET E-MAIL SYSTEM
usingskymail.mail.mail_class;
usingSystem.Drawing;

namespaceskymail.mail.u
{
publicpartialclassmail_user_home : System.Web.UI.Page
{
skymail_main_class mm = newskymail_main_class();
MailClass mc = newMailClass();
MailClass2mct = newMailClass2();
DataTabledt = newDataTable();
int count = 0;
stringmail_id;
inti = 0;
protectedvoidPage_Load(object sender, EventArgs e)
{
GridView1.PageSize = mct.get_mails_per_page();
if (HttpContext.Current.User.Identity.Name.ToString() != "")
{
Session["status"] = null;
DataTableda_ta = newDataTable();
stringlast_act= mc.get_last_activity_user(HttpContext.Current.User.Identity.Name.ToString());
if (last_act != "No")
{
last_activity.Text = last_act;
}
else
{
last_activity.Visible = false;
Label1.Visible = false;
}

if (Session["info"] != null)
{
info_user.ForeColor = Color.Red;
if (Session["info"].ToString() == "Mail Deleted!")
{
info_user.Text = Session["info"].ToString();
undo.Visible = true;
}
else
{
info_user.Text = Session["info"].ToString();
}
Session["info"] = null;
}

if (!IsPostBack)
{
sort_by.Items.Add("All");
sort_by.Items.Add("Unread");
sort_by.Items.Add("Read");
mailBind();
}
}
else
{
Response.Redirect("~/login.aspx");
}
}
publicvoidmailBind() 59
INTRANET E-MAIL SYSTEM
{
GridView1.DataSource =
mc.get_from_usermail(HttpContext.Current.User.Identity.Name.ToString());
GridView1.DataBind();
}
protectedvoid GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Labelmailid = (Label)e.Row.FindControl("mailid");
CheckBox select = (CheckBox)e.Row.FindControl("chkbox");
Literal from = (Literal)e.Row.FindControl("from_lit");
LinkButton subject = (LinkButton)e.Row.FindControl("sub_link");
Label content = (Label)e.Row.FindControl("contents");
Literal date = (Literal)e.Row.FindControl("date_lit");
Literal size = (Literal)e.Row.FindControl("size_lit");
System.Web.UI.WebControls.Image
attach_image=(System.Web.UI.WebControls.Image)e.Row.FindControl("attach_image");
mail_id= (DataBinder.Eval(e.Row.DataItem, "mid")).ToString();
mailid.Text = mail_id;
System.Web.UI.WebControls.Imageimg_new =
(System.Web.UI.WebControls.Image)e.Row.FindControl("Image_new");
from.Text = mc.get_sender_address((DataBinder.Eval(e.Row.DataItem, "sen_id")).ToString());
string sub= (DataBinder.Eval(e.Row.DataItem, "sub")).ToString();
if (sub == string.Empty)
{
sub = "[ No Subject ]";
}
stringmsg = (DataBinder.Eval(e.Row.DataItem, "msg")).ToString().Replace("<br>"," ");
if (sub.Length> 52)
{
subject.Text = sub.Substring(0, 47) + "...";
content.Text = "";
}
else
{
subject.Text = sub;
intlen=52-sub.Length;
if (msg.Length>len)
{
content.Text = msg.Substring(0, len) + "...";
}
else
{
content.Text = msg.Substring(0, msg.Length) + "...";
}
}
subject.CommandArgument = (DataBinder.Eval(e.Row.DataItem, "mid").ToString());
date.Text = (DataBinder.Eval(e.Row.DataItem, "msgdate")).ToString();
size.Text = (DataBinder.Eval(e.Row.DataItem, "sen_ip")).ToString();
if (mc.check_read_mail(mail_id))
{
img_new.Visible = false;
e.Row.BackColor = Color.Lavender;
}
else
{
DateTimedte =
Convert.ToDateTime(mc.check_new(HttpContext.Current.User.Identity.Name.ToString()));
DateTimeadt=Convert.ToDateTime(date.Text);
int diff=DateTime.Compare(dte,adt); 60
INTRANET E-MAIL SYSTEM
if (diff > 0)
{
img_new.Visible = true;
}
else
{
img_new.Visible = false;
}
}
intval=Convert.ToInt32((DataBinder.Eval(e.Row.DataItem,"att_id")));
if(val!=0)
{
attach_image.Visible = true;
}
}

}
protectedvoid GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "view")
{
stringEncriptedText = mc.mailidEncript(e.CommandArgument.ToString());
Response.Redirect("view_mail.aspx?mid="+EncriptedText+"");
}
}
protectedvoid CheckBox1_CheckedChanged(object sender, EventArgs e)
{
CheckBoxchk;
foreach (GridViewRow grid in GridView1.Rows)
{
chk=(CheckBox)grid.FindControl("chkbox");
if (CheckBox1.Checked==true)
{
chk.Checked = true;
}
else
{
chk.Checked = false;
}
}
}
protectedvoidImgdelete_Click(object sender, ImageClickEventArgs e)
{
List<string>lst = newList<string>();
CheckBoxchk;
Labellb;
info_user.ForeColor = Color.Red;
foreach(GridViewRow grid in GridView1.Rows)
{
lb = (Label)grid.FindControl("mailid");
chk = (CheckBox)grid.FindControl("Chkbox");
if (chk.Checked)
{
lst.Add(lb.Text);
mc.delete_mail_rec(lb.Text.ToString());

count++;
i++;
}
Session["del_mid"] = lst.ToArray();
} 61
INTRANET E-MAIL SYSTEM
if (count > 0)
{
if (sort_by.SelectedItem.Text == "All")
{
mailBind();
}
if (sort_by.SelectedItem.Text == "Read")
{
readMailBind();
}
if (sort_by.SelectedItem.Text == "Unread")
{
unreadMailBind();
}
info_user.Visible = true;
info_user.Text = count + " mails Moved to Trash!";
undo.Visible=true;
}
else
{
info_user.Visible = true;
info_user.Text = "Please select to delete!";
}
}
protectedvoid GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
if (sort_by.SelectedItem.Text == "All")
{
GridView1.DataSource =
mc.get_from_usermail(HttpContext.Current.User.Identity.Name.ToString());
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
if (sort_by.SelectedItem.Text == "Read")
{
GridView1.DataSource =
mc.sort_read_mails(HttpContext.Current.User.Identity.Name.ToString());
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
if (sort_by.SelectedItem.Text == "Unread")
{
GridView1.DataSource =
mc.sort_unread_mails(HttpContext.Current.User.Identity.Name.ToString());
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
if (bydate.Checked == true)
{
GridView1.DataSource =
mc.get_sorted_mails_date(drop_search.SelectedItem.ToString(),
HttpContext.Current.User.Identity.Name.ToString());
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
if (byname.Checked)
{
GridView1.DataSource =
mc.get_sorted_mails_uname(drop_search.SelectedItem.ToString(),
HttpContext.Current.User.Identity.Name.ToString());
GridView1.PageIndex = e.NewPageIndex; 62
INTRANET E-MAIL SYSTEM
GridView1.DataBind();
}
if (bymail.Checked)
{
GridView1.DataSource =
mc.get_sorted_mails_sub(drop_search.SelectedItem.ToString(),
HttpContext.Current.User.Identity.Name.ToString());
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
}
protectedvoiddrop_search_SelectedIndexChanged(object sender, EventArgs e)
{
if (byname.Checked)
{
if (drop_search.SelectedItem.Text != "SELECT AN ADDRESS")
{
GridView1.DataSource =
mc.get_sorted_mails_uname(drop_search.SelectedItem.ToString(),
HttpContext.Current.User.Identity.Name.ToString());
GridView1.DataBind();
}
}
if (bydate.Checked)
{
if (drop_search.SelectedItem.Text != "SELECT A DATE")
{
GridView1.DataSource =
mc.get_sorted_mails_date(drop_search.SelectedItem.ToString(),
HttpContext.Current.User.Identity.Name.ToString());
GridView1.DataBind();
}
}
if (bymail.Checked)
{
if (drop_search.SelectedItem.Text != "SELECT A SUBJECT")
{
GridView1.DataSource =
mc.get_sorted_mails_sub(drop_search.SelectedItem.ToString(),
HttpContext.Current.User.Identity.Name.ToString());
GridView1.DataBind();
}
}
}
protectedvoidbydate_CheckedChanged(object sender, EventArgs e)
{
if (bydate.Checked)
{
drop_search.DataSource = mc.get_mail_date(HttpContext.Current.User.Identity.Name.ToString());
drop_search.DataTextField = "msgdate";
drop_search.DataBind();
}
}
protectedvoidbyname_CheckedChanged(object sender, EventArgs e)
{
if (byname.Checked)
{
drop_search.DataSource =
mc.get_mail_address(HttpContext.Current.User.Identity.Name.ToString());
drop_search.DataTextField = "uname";
drop_search.DataBind(); 63
INTRANET E-MAIL SYSTEM
}
}
protectedvoidbymail_CheckedChanged(object sender, EventArgs e)
{
if (bymail.Checked)
{
drop_search.DataSource = mc.get_mail_sub(HttpContext.Current.User.Identity.Name.ToString());
drop_search.DataTextField = "sub";
drop_search.DataBind();
}
}
protectedvoidsort_by_SelectedIndexChanged(object sender, EventArgs e)
{
if (sort_by.SelectedItem.Text == "All")
{
mailBind();
}
if (sort_by.SelectedItem.Text == "Read")
{
readMailBind();
}
if (sort_by.SelectedItem.Text == "Unread")
{
unreadMailBind();
}
bymail.Checked = false;
byname.Checked = false;
bydate.Checked = false;
drop_search.DataSource = "";
drop_search.DataBind();
}
protectedvoidundo_Click(object sender, EventArgs e)
{
if (Session["del_mid"] != null)
{
string[] arr = (string[])Session["del_mid"];
foreach (stringstrinarr)
{
mc.undo_delete_mail_rec(str);
}
}
if(Session["view_delete"]!=null)
{
string mid = Session["view_delete"].ToString();
mc.undo_delete_mail_rec(mid);
}
if (sort_by.SelectedItem.Text == "All")
{
mailBind();
}
if (sort_by.SelectedItem.Text == "Read")
{
readMailBind();
}
if (sort_by.SelectedItem.Text == "Unread")
{
unreadMailBind();
}
info_user.Visible = false;
undo.Visible = false;
Session["del_mid"] = null; 64
INTRANET E-MAIL SYSTEM
}
protectedvoidImgRefresh_Click(object sender, ImageClickEventArgs e)
{
info_user.Visible = false;
undo.Visible = false;
bymail.Checked = false;
byname.Checked = false;
bydate.Checked = false;
drop_search.DataSource = "";
drop_search.DataBind();
if (sort_by.SelectedItem.Text == "All")
{
mailBind();
}
if (sort_by.SelectedItem.Text == "Read")
{
readMailBind();
}
if (sort_by.SelectedItem.Text == "Unread")
{
unreadMailBind();
}
CheckBox1.Checked = false;

}
publicvoidreadMailBind()
{
GridView1.DataSource =
mc.sort_read_mails(HttpContext.Current.User.Identity.Name.ToString());
GridView1.DataBind();
}
publicvoidunreadMailBind()
{
GridView1.DataSource =
mc.sort_unread_mails(HttpContext.Current.User.Identity.Name.ToString());
GridView1.DataBind();
}
}
}

12.2 SCREEN SHOTS


1. Login page

65
INTRANET E-MAIL SYSTEM

2. Registration Page

3. Inbox
66
INTRANET E-MAIL SYSTEM

4.Sent Mail

5. Create mail

67
INTRANET E-MAIL SYSTEM

6. View mail

7. Trash
68
INTRANET E-MAIL SYSTEM

8. Contact list

9. User Account

69
INTRANET E-MAIL SYSTEM

10. Password Recovery

11. Administrator Dashboard

70
INTRANET E-MAIL SYSTEM

12. Manage user

13. Database Information

71
INTRANET E-MAIL SYSTEM

14. Administrator Mailbox

15. Inactive Accounts

72
INTRANET E-MAIL SYSTEM

16. Activity log

17. Reset Password

73
INTRANET E-MAIL SYSTEM

18. Role management

74
INTRANET E-MAIL SYSTEM

BIBLIOGRAPHY

 ASP.NET AND C#

75
INTRANET E-MAIL SYSTEM
 Beginning Visual C#® 2010 by Karli Watson, Christian Nagel, Jacob Hammer
Pedersen, Jon D. Reid, Morgan Skinner
 http://www.tutorialspoint.com/asp.net/asp.net_introduction.htm
 http://en.wikipedia.org/wiki/ASP.NET
 https://msdn.microsoft.com/en-us/library/4w3ex9c2(v=vs.140).aspx

 SQL SERVER 2008

 https://technet.microsoft.com/en-us/library/ms166352(v=sql.90).aspx
 SQL – The programming language of oracle ,Ivan Bayross , First edition

 System analysis and design ,Award .E.M , First edition

 http://en.wikipedia.org/wiki/Microsoft_SQL_Server

76