Beruflich Dokumente
Kultur Dokumente
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.
6
INTRANET E-MAIL SYSTEM
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.
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
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.
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.
Dynamic Support
Office Programmability
Type Equivalence Support
Covariance and Contravariance
New Command-Line Options
2.2DATABASE
MICROSOFT SQL SERVER 2008
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
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.
2.3 PLATFORM
WINDOWS 7 PROFESSIONAL
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
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.
The proposed system supports a wide range of features, some of them are:
18
INTRANET E-MAIL SYSTEM
4.3.2 OPERATIONAL FEASIBILITY
Question that going to be risen in the operational feasibility are:
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.
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
Support
20
INTRANET E-MAIL SYSTEM
Cost effectiveness
Development speed
Stability
Reliability
Accuracy
Memory : 10 GB
Ram : 512 MB
21
INTRANET E-MAIL SYSTEM
DESIGN TOOL
LEVEL-0
22
INTRANET E-MAIL SYSTEM
LEVEL – 1
23
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.
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:
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.
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.
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.
6. DELETING MAILS.
7. RECOVERY OF PASSWORD.
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.
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.
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.
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.
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.
Table: Security_Question
Description: Security questions for the password recovery.
Table: Block_mail
Description: Blocked users and blocked by user information.
Table: attach_mail
35
INTRANET E-MAIL SYSTEM
Description: Blocked users and blocked by user information.
Table: skymail_gsettings
Description: settings of the web applications.
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.
37
INTRANET E-MAIL SYSTEM
SYSTEM 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.
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
1. Careful planning.
2. Investigation
3. Design of methods
5. Evaluation of changeover.
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
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:
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: -
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;
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");
}
}
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>");
}
}
}
}
}
}
}
}
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();
}
}
}
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
70
INTRANET E-MAIL SYSTEM
71
INTRANET E-MAIL SYSTEM
72
INTRANET E-MAIL SYSTEM
73
INTRANET E-MAIL SYSTEM
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
https://technet.microsoft.com/en-us/library/ms166352(v=sql.90).aspx
SQL – The programming language of oracle ,Ivan Bayross , First edition
http://en.wikipedia.org/wiki/Microsoft_SQL_Server
76