0% found this document useful (0 votes)
19 views139 pages

Online Mail System Project Overview

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views139 pages

Online Mail System Project Overview

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ACKNOWLEDGEMENT

I would like to express my heartfelt gratitude to all those who contributed to the
successful completion of this project on the Online Mail System. Firstly, I extend
my sincerest appreciation to my mentor, Dr. Sunil Kumar Sharma for their
invaluable guidance and support throughout this journey. I am also immensely
thankful to my friend Amar Singh for his collaboration and insightful discussions,
which enriched the project. Additionally, I acknowledge the contributions of the
online platforms and resources that facilitated our research and development
process. Furthermore, Lastly, I want to thank my family and friends for their
unwavering encouragement and understanding during this endeavour. This project
would not have been possible without the collective efforts of all involved, and for
that, I am truly grateful.

Utkarsh Kumar

Enrolment No: 2108110948

1
Contents
Synopsis
Chapter1:Introduction ..............................................................................................................25
1.1 Objective .........................................................................................................................27
1.2 Purpose ...........................................................................................................................28
1.3 Aim ..................................................................................................................................29
1.4 Vision ...............................................................................................................................30
1.5 References: ......................................................................................................................30
1.6 Definitions, Acronyms, and Abbreviations........................................................................31
Chapter-2 Problem Formulation ................................................................................................32
2.1 Problem Definition ...........................................................................................................33
2.2 Existing Systems...............................................................................................................34
 Gmail (Google): ...........................................................................................................34
 [Link] (Microsoft ..............................................................................................34
 Yahoo Mail ..................................................................................................................34
2.3 Proposed System: ............................................................................................................35
2.4 Advantage over Existing ...................................................................................................38
2.5 Justification......................................................................................................................39
Chapter 3 : System Analysis and Design.....................................................................................40
3.1 Product Perspective: ........................................................................................................41
3.2 Product functions: ...........................................................................................................41
3.3 User Characteristics: ........................................................................................................42
3.4 User Classes: ....................................................................................................................43
3.5 Tools and Environment: ...................................................................................................44
3.6 Operating Environment :..................................................................................................46
3.7 Assumptions and Dependencies: .....................................................................................47
Chapter-4 System Implementation and testing .........................................................................50
4.1 System Requirements: .....................................................................................................51

2
4.2 Security Requirement ......................................................................................................52
4.3 Design Requirements: ......................................................................................................54
4.4 User Modules: .................................................................................................................55
4.5 Feasibility Study: ..............................................................................................................56
a) Technical feasibility: ....................................................................................................57
b) Operational Feasibility: ...................................................................................................58
c) Economic Feasibility: ........................................................................................................58
4.6 System Testing: ................................................................................................................60
Chapter-5 Conclusion ................................................................................................................62
5.1 Maintenance: ..................................................................................................................63
5.2 Limitations: ......................................................................................................................65
5.3 Future Scope : ..................................................................................................................66
Appendix ...................................................................................................................................68
A.1 Data Flow diagram (DFD): ................................................................................................69
a) Context Level DFD(Level 0):.........................................................................................69
b) Level 1 DFD .................................................................................................................70
c) Level 2 DFD .................................................................................................................71
A.2 ER Diagram ......................................................................................................................72
A.3 Use Case ..........................................................................................................................73
A.4 Class Diagram ..................................................................................................................74
A.5 Database Design ..............................................................................................................75
1- USER INFO...................................................................................................................75
2- LATESTUPD .................................................................................................................75
3- Mails-: .........................................................................................................................76
4-DRAFT-: ...........................................................................................................................76
USER INTERFACE .......................................................................................................................77
Codes ........................................................................................................................................90

3
4
Online Mail System
(Synopsis)

5
INTRODUCTION
Mailing services gives free web based electronic mail. Mailing Services enables you to
acquire new customers and to increase growth opportunities with existing customers. With
a wide range of Direct MailLists Services, label mailing or mail merge services, we enable
you to communicate with customers in a better way.

AIM
The main aim of our project is to provide a mailing services which lets you compose mail
and send to a respective selected object. You can send documents or images (attachments).
Also one can search emailswith the search technology within the inbox. outbox, drafts.

OBJECTIVE
To prepare new mailing system on PHP which provide all the services provide by any
general mailing services with some extra features such as easy to operate, free messaging
services are objective to make this project at very huge level but we just learn how to make
mailing servicesystem we are able in future to work over this project easily and provide
much better facilities. So here we are showing you dummy project on mailing services
prepared with help of PHP and some other designing tools.

VISION
Our vision for this project and training is to build and maintains a customer-oriented culture.
The customer satisfaction is what we aspire for. Hence we are to provide a mailing service
that is easy and comfortable to control and function with

6
1-Project Category and Technologies Used
This project falls under the category of Internet Technologies & RDBMS (Relational
Database Management System). The system primarily focuses on creating a website
with a backend online database.

Technologies Used:

 Front-End:
o HTML: Hypertext Markup Language - Defines the structure and
content of web pages.
o JavaScript: A scripting language used to add interactivity to web
pages.
o CSS: Cascading Style Sheets - Defines the presentation of web pages
(layout, colors, fonts, etc.).
 Back-End:
o PHP (8.2.0): Hypertext Preprocessor - A server-side scripting language
used to generate dynamic web content.

Database:

 MySQL (8.1): An open-source relational database management system.

Additional Information about PHP:

 PHP is a general-purpose server-side scripting language originally designed


for web development to create dynamic web pages.
 It was one of the first server-side scripting languages designed to be
embedded directly in HTML source code, eliminating the need for separate
files to process data.
 Web servers with a PHP processor module interpret the code and generate
the resulting web page.
 PHP is free software released under the PHP License, which is incompatible
with the GNU General Public License (GPL) due to licensing restrictions.

7
MySQL: The Go-To Database for PHP Applications
MySQL is the undisputed champion when it comes to database systems used alongside
PHP for web development. Here's a breakdown of its key features:

 Web-Oriented: Designed specifically for the web environment, MySQL


excels in managing data for dynamic websites.
 Server-Side Powerhouse: It runs on a server, providing a robust platform for
storing and manipulating data behind the scenes.
 Scalability Champion: MySQL caters to both small-scale projects and large-
scale applications, adapting to your needs.
 Speed and Efficiency: Its performance is widely recognized for being fast
and reliable, ensuring smooth database operations.
 Structured Query Language (SQL): MySQL adheres to the industry-
standard SQL, making it easy to learn and use for querying and managing
data.
 Platform Agnostic: MySQL compiles and runs on a variety of platforms,
offering flexibility in your development environment.
 Open-Source and Cost-Effective: Download and use MySQL freely,
making it an attractive option for cost-conscious projects.
 Backed by Oracle: While open-source, MySQL benefits from the
development, distribution, and support of Oracle Corporation.
 Relational Power: MySQL utilizes the relational database model, allowing
for efficient data organization and retrieval based on relationships between
tables.
 Client/Server or Embedded Systems: MySQL offers flexibility, functioning
in both client/server architectures for larger applications or embedded systems
for smaller projects.
 Active Community: A vast amount of contributed software and resources
exist for MySQL, providing a supportive development ecosystem.

HTML (Hypertext Markup Language):


 Function: HTML serves as the foundation of web pages. It defines the
structure and content, acting like a blueprint.
 What it Does: HTML uses tags to specify elements like headings, paragraphs,
lists, images, and more. These tags tell the browser how to display the content.

8
 Example: <p>This is a paragraph of text in HTML.</p>
defines a paragraph element containing text.

CSS (Cascading Style Sheets):


 Function: CSS controls the presentation of web pages, handling the visual
aspects like layout, colors, fonts, and animations.
 What it Does: CSS uses selectors to target specific HTML elements and
define their styles. These styles can be applied inline (within HTML tags),
internally (in a <style> tag within the HTML document), or externally (in
a separate .css file linked to the HTML).
 Example: body {background-color: #f0f0f0; font-family:
Arial, sans-serif;} sets the background color of the entire page and
defines the default font family.

JavaScript (JS):
 Function: JavaScript adds interactivity and dynamic behavior to web pages.
Unlike HTML and CSS, which are static, JavaScript can execute code and
respond to user actions.
 What it Does: JavaScript can manipulate the content and style of a web page,
respond to user events (clicks, mouseovers, etc.), make calculations, validate
user input, and communicate with servers to retrieve data or send information.
 Example: function changeColor(element) {
[Link] = 'red'; } defines a function that changes
the color of an HTML element (identified by its ID) to red when called.

Working Together:
These three languages work in tandem to create web pages. HTML provides the
structure, CSS defines the style, and JavaScript brings the page to life with
interactivity. Here's an analogy:

 HTML is like the skeleton of a building, defining the basic structure and
layout.
 CSS is like the skin of the building, determining its appearance (colors, fonts,
etc.).
 JavaScript is like the electrical wiring and plumbing that enables
functionality (lighting, running water, etc.)

9
2-Feasibility Study Summary
A feasibility study is crucial for determining the viability of a project. It assesses whether
the project is worth pursuing based on three key aspects: technical, operational, and
economic feasibility.

Technical Feasibility:

This focuses on whether the project can be built with existing technology and
resources. Here's how your project demonstrates technical feasibility:

 Existing Infrastructure: The organization already has a server-client setup,


eliminating the need for additional hardware.
 Software Availability: All necessary software (PHP, HTML, CSS, JavaScript,
MySQL) is already available, avoiding software acquisition costs.

The provided text about the technical feasibility of the system looks good. Here are
some minor points to consider:

 COM Technology Clarification: While COM (Component Object Model)


might have been a relevant technology in the past, it's not commonly used for
modern web development. For a more current approach, you could mention
using server-side scripting languages like PHP to handle server-side logic and
interact with the MySQL database.
 Client-Side Functionality: It's helpful to clarify the client-side functionality.
Will JavaScript be used to handle user interactions and dynamically update
the web interface, or will the client components be simpler COM objects for
a specific purpose.

Operational Feasibility:

This examines how the project will integrate with the organization's existing
operations and workflows. You've started outlining this, but consider adding details
like:

 Impact on Users: How will the new system affect user workflows? Will
training be required?

10
 Organizational Changes: Will any restructuring or process changes be
necessary to accommodate the new system?
 Operational Support: Who will be responsible for ongoing maintenance and
support of the system.

The provided reasons indicate some positive aspects for the operational feasibility
of the system. Here's a breakdown and some suggestions for improvement:

Positive Points:

 Existing Computerized System Familiarity: The organization's experience


with computerized systems suggests a smoother transition to the new system,
as there's already a comfort level with technology.
 Improved User Interface: The proposed system's user-friendliness and
ability to generate clear messages during operation are definite advantages for
user adoption.

Additional Considerations for Operational Feasibility:

 User Training: While familiarity with computers exists, is there a need for
specific training on the new system's functionalities?
 Data Migration: If the new system replaces an existing one, how will data be
migrated? This process should be planned and communicated clearly to avoid
disruptions.
 Change Management: Any new system implementation requires change
management. How will user resistance be addressed, and how will user buy-
in be encouraged

Economic Feasibility:

This assesses the financial viability of the project, including costs and potential
return on investment (ROI). Consider including:

 Development Costs: Estimated costs for development, testing, and


deployment.
 Hardware/Software Costs: Any potential hardware or software upgrades
needed.
 Maintenance Costs: Ongoing costs for maintaining the system after
deployment.

11
 Expected Benefits: Increased productivity, cost savings, or other benefits the
system might bring.

The provided reasons highlight the cost-effectiveness of the system, making a strong
case for financial feasibility. Here's a breakdown of the points and some suggestions
for improvement:

Positive Points:

 Development Cost: The fact that a trainee student is developing the system
significantly reduces development costs.
 Minimal Hardware Investment: Leveraging the existing server-client setup
eliminates hardware expenses.
 Software Availability: No additional software purchases are required, further
reducing costs.
 Reduced Time Investment: The system's potential to streamline daily
transactions can lead to time savings and potentially reduced labor costs.
 Low Training Costs: Since employees are familiar with computers, the
learning curve for the new system might be minimal.

12
3-Module Descriptions for the Online Mail System
This document outlines the functionalities of the various modules within the online mail
system:

1. User Module:

 Home: This module displays the web application's homepage. It provides an


overview of the system's purpose and includes links to key functionalities like
Inbox, Sent Items, Search, Contact Us, and potentially others.
 Register User: This module allows new users to register for the system by
creating an account. This typically involves providing personal information
and setting a username and password.
 Login Module: This module enables registered users to log in to the system
using their credentials (username and password). Upon successful login, users
can access their email functionalities.

2. Mail Module:

 Inbox: This module displays all email messages received by the user. Users
can view, open, and manage their incoming emails within this section.
 Sent: This module provides a list of all email messages that the user has sent
to others. Users can access and potentially manage their sent emails here.
 Draft: This module allows users to save partially composed emails in a draft
state. Users can revisit and complete these drafts at a later time before
sending them.

3. Change Password/Forgot Password Module:

 Change Password: This module enables users to modify their existing


password. It typically involves entering the current password, a new
password, and confirming the new password for security purposes.
 Forgot Password: This module assists users who have forgotten their login
credentials. By providing their username or email address, users can initiate
a password reset process. The system might send a password reset link or
temporary password to the user's registered email address.

13
4- System Requirements:

Minimum Hardware Requirements:

 Processor: While a Pentium-IV 1.7 GHz can technically work for development, a
more modern processor (e.g., Intel Core i3 or AMD Ryzen 3) is highly recommended
for smoother development and testing.
 RAM: 2GB of RAM is a good minimum for development purposes. 8GB or more
would be ideal for improved performance, especially when running multiple
programs simultaneously.
 HDD (Hard Disk Drive): While 20GB might be sufficient for the initial
development, consider using a Solid State Drive (SSD) with at least 128GB of
storage. SSDs offer significantly faster loading times compared to traditional HDDs..

Software Requirements:

 Operating System: While Windows 7/XP might technically work, these operating
systems are no longer supported by Microsoft and have security vulnerabilities. It's
strongly recommended to use a more recent version of Windows (e.g., Windows 10
or 11) or a different operating system like macOS or Linux.
 Front-End Development Tools: HTML5 and CSS3 are essential for building the
web pages. Consider using a modern code editor with features like syntax
highlighting and code completion (e.g., Visual Studio Code, Sublime Text).
Additionally, a JavaScript framework like React or Angular could be explored for
more complex user interfaces (optional).
 Back-End Development Tool: PHP remains the primary choice for server-side
scripting.
 Database Management System: MySQL is a good option for the database.
 Data Reporting Tool (Optional): While "Data Report" is a generic term, some
popular data reporting tools include phpMyAdmin. This tool can help me visualize
and analyze data stored in the MySQL database .

14
A.1 Data Flow diagram (DFD):
A Data Flow Diagram (DFD) visually represents the flow of data within your online
messaging system. Here's a breakdown of the DFD for your system:

a) Context Level DFD(Level 0):

This high-level view depicts the entire system and its interaction with external
entities.

 External Entity: Users


 Data Flow (In): Login credentials, message content, recipient information
 Data Flow (Out): System messages (login success/failure, message delivery
status)

Fig-A.1 -: 0 level DFD (Context-level DFD)

15
b) Level 1 DFD

Fig-A.2 -: 1 level DFD

16
c) Level 2 DFD

Fig-A.3 -: 2 level DFD

17
A.2 ER Diagram

18
Fig A.4 -: ERD

A.3 Use Case

Fig A.4 -: USE CASE

19
A.4 Class Diagram

Fig-A.4 -: Class Diagram

20
A.5 Database Design

1- USER INFO

COLUMN TYPE NULL CONSTRAINTS


User_id(primary) Int (11) No Primary Not Null
User_name Char(50) No
password Varchar(30) No
Gender Enum(m,f) No
Dob Date No

 `user_jd` int(11) NOT NULL AUTO_INCREMENT


 PRIMARY KEY (`user_jd`),
 UNIQUE KEY `user_name`
 KEY `gender` (`gender`)

2- LATESTUPD

COLUMN TYPE NULL CONSTRAINTS


upd_id(primary) Int (11) No Primary key
Title varChar(50) No
Content Longtext() No
Image Varchar(50) No
Data data No

 `upd_id` int(11) NOT NULL AUTO_INCREMENT,


 PRIMARY KEY (`upd_id`)

21
3- Mails-:

COLUMN TYPE NULL CONSTRAINTS


Mail_id(primary) Int (11) No Primary key
Rec_id varChar(50) No
Sen_id Varchar(30) No
Sub Varchar(50) No
Msg longtext() No
Attachment Longtext() No
recDT Data() No
 `mail_id` int(11) NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (`mail_id`)

4-DRAFT-:
COLUMN TYPE NULL CONSTRAINTS
draft_id(primary) Int (11) No
user_id varChar(50) No
Sub Varchar(30) No
msgdt Data() No
Msg longtext() No
attachment Longtext() No

 `draft_id` int(11) NOT NULL AUTO_INCREMENT,


 PRIMARY KEY (`draft_id`)

22
23
Online Mail System
(Project)

24
Chapter1:Introduction

25
INTRODUCTION

Mailing services gives free web based electronic mail. Mailing Services enables you to
acquire new customers and to increase growth opportunities with existing customers. With
a wide range of Direct Mail Lists Services, label mailing or mail merge services, we enable
you to communicate with customers in a better [Link] today's digital age, businesses face
the challenge of balancing traditional communication methods with modern customer
expectations. While email remains crucial, personalized marketing efforts can significantly
improve customer engagement and loyalty. This project will explore the effectiveness of
Mailing Services' mail merge functionality in boosting customer retention for small
businesses. Through a comparative analysis of personalized and non-personalized email
campaigns, we aim to demonstrate the impact of mail merge on customer engagement
metrics such as open rates and click-through rates. By analyzing data from real-world
campaigns, this project seeks to provide valuable insights for businesses seeking to optimize
their email marketing [Link] revised introduction provides a more focused
overview of your project, including a problem (impersonal email marketing), a proposed
solution (Mailing Services' mail merge), research methods (data analysis), and project goals
(demonstrating the effectiveness of mail merge).

26
1.1 Objective
To prepare new mailing system on PHP which provide all the services provide by any
general mailing services with some extra features such as easy to operate, free messaging
services are objective to make this project at very huge level but we just learn how to
make mailing service system we are able in future to work over this project easily and
provide much better facilities. So here we are showing you dummy project on mailing
services prepared with help of PHP and some other designing tools.

This project aims to develop a secure and feature-rich online mail system accessible from
any device. Here's what you can expect:

 Easy Sign-up and Login: Securely create your account and manage your
inbox with ease.
 Organized Mailbox: Keep your emails categorized with folders for received,
sent, draft, and deleted messages.
 Compose Rich Emails: Craft compelling emails using a user-friendly editor
that supports text formatting, attachments, and even images.
 Seamless User Experience: Enjoy an intuitive interface that adapts perfectly
to desktops, tablets, and smartphones.

Built with Security and Reliability in Mind:

 Minimal Downtime: Experience a reliable system designed to handle email


traffic efficiently.
 Scalability for Growth: The system is built to accommodate a growing user
base and increasing email volumes.

Additional Considerations:

 Security and Privacy Standards: We adhere to fundamental data protection


and privacy regulations.
 Documentation and Support: User guides, help documentation, and basic
support systems will be available for assistance.

27
1.2 Purpose
The main aim of our project is to provide a mailing services which lets you compose mail
and send to a respective selected object. You can send documents or images
(attachments).Also one can search emails with the search technology within the inbox,
outbox, drafts. This project will delve deeper into the specific functionalities of your
message-sending mailing system. It will analyze its capabilities, explore potential use
cases (e.g., marketing campaigns, appointment reminders, customer notifications), and
evaluate its impact on communication efficiency.

The purpose of this document can be broken down into several key aims:

1. To create a secure online mail system: This document outlines the steps
necessary to build a system that protects user data and communications
through features like secure logins, encrypted data storage, and secure
communication channels.
2. To provide a user-friendly and engaging email experience: The document
focuses on designing an intuitive interface that is easy to learn and use,
promoting user adoption and encouraging active engagement with the email
system.
3. To ensure scalability and reliability: The document highlights the
importance of building a system that can accommodate a growing user base
without compromising performance. It emphasizes minimal downtime and
consistent system operation.
4. To deliver a feature-rich environment for basic email management: The
document details the functionalities needed to meet essential user needs, such
as composing, sending, receiving, organizing, and retrieving emails.
5. To enable interoperability and integration with other tools and services:
The document explores the potential for basic integration with external
systems to enhance overall user productivity and facilitate data exchange.
6. To build user trust through compliance and security practices: The
document emphasizes the importance of adhering to data protection and
privacy regulations. Regular security audits and updates will demonstrate the
system's commitment to user trust and data security.

28
1.3 Aim
This project aims to develop a user-friendly, message-sending mailing system using PHP.
The system will provide core functionalities typically found in general mailing services,
with a focus on efficient outbound communication.

1: Key Functionalities:
Message composition: Users can create and compose new messages with rich text
formatting options.

Attachment support: The system allows attaching documents and images to emails
for richer communication.

Recipient selection: Users can easily select recipients from their address book or
manually enter email addresses.

Drafts Management: The system will provide separate folders for managing sent
and draft messages for future reference.

2: Focus on User Experience:


The project prioritizes intuitive design and user-friendliness. The interface will be
clear and easy to navigate, ensuring a smooth experience for users with varying
levels of technical expertise.

3: Future Enhancements:
While this project focuses on core functionalities, the codebase will be
designed with scalability in mind. This allows for future integration of
advanced features such as:
 Message scheduling
 Contact management and address book features
 Spam filtering and content moderation
 Integration with third-party services like calendars or CRM systems
29
1.4 Vision
This project envisions a future where our scalable and user-friendly mailing system
empowers businesses and individuals to communicate seamlessly and efficiently. We aim
to become a leading resource for secure and reliable message delivery, offering a robust
platform that can be customized to meet diverse communication needs.

Key aspects of this revised vision statement:


Focuses on future impact: It emphasizes the project's potential to become a leading
resource.

Highlights scalability and user-friendliness: These are key features you're


building into the system.

Mentions security and reliability: These are crucial aspects of any mailing system.

Emphasizes customization: This acknowledges the potential for future expansion


based on user needs.

1.5 References:

Technical References:
[Link] - Mail Function: [Link]
(Official documentation on the PHP mail function)

PHPMailer - A Powerful Email Sending Library for PHP:


[Link] (Popular library for sending emails
with PHP)

30
Project Inspiration and Case Studies:

Open-Source Mailing Systems: Research open-source mailing systems like Round


cube or Horde to understand their functionalities and implementation details.

Case Studies on Building Email Sending Systems: Look for online articles or case
studies that discuss the process of building email sending systems with PHP.

Articles on Scalable PHP Applications: Research techniques for building scalable


PHP applications to prepare your system for future growth.

1.6 Definitions, Acronyms, and Abbreviations


 SRS: Software Requirements Specification
 UI: User Interface
 UX: User Experience
 DBMS: Database Management System

31
Chapter-2 Problem
Formulation

32
2.1 Problem Definition
Traditional email systems often fall short of addressing the evolving communication
needs of businesses and individuals. These limitations can be categorized into four key
areas:

Limited Functionality: Basic email systems primarily offer sending and receiving
messages, lacking features that enhance communication workflows. Scheduling
messages, searching for specific emails, and attaching documents are functionalities
often missing or cumbersome to use.

Scalability Issues: As email usage grows, managing large volumes of emails and
attachments can become a challenge. Basic systems may struggle with performance and
storage limitations, hindering efficient communication when dealing with high email
traffic.

Security Concerns: Unsecured email communication poses a significant risk for data
breaches and privacy violations. Sensitive information transmitted through plain text
emails is vulnerable to interception.

Usability Issues: Complex interfaces and unclear navigation can hinder user experience,
especially for non-technical users. An intuitive and user-friendly interface is crucial for
widespread adoption and efficient communication.

This revised section provides a more concise and focused definition of the problem. It
highlights the four key limitations of basic email systems and their impact on
communication:

a) Lack of features beyond basic sending and receiving


b) Difficulty handling large volumes of emails
c) Security risks with unencrypted communication
d) User experience issues due to complex interfaces

33
2.2 Existing Systems

A variety of popular email service providers offer web-based mailing systems with a
range of functionalities Efficient and reliable communication is a cornerstone of success
in today's digital landscape. Businesses and individuals alike rely on email for a wide
range of interactions, from sending marketing campaigns to maintaining personal
relationships. However, traditional email systems can present challenges in terms of:.
Here's a brief overview of some prominent examples:

 Gmail (Google): A free email service with a user-friendly interface,


extensive storage space, and integration with other Google products. Gmail
offers features like message scheduling, powerful search capabilities, and
robust spam filtering.

 [Link] (Microsoft): Another free webmail service known for its


integration with Microsoft Office suite applications. Outlook provides
features like email organization tools, calendar integration, and
customizable email rules.

 Yahoo Mail: A free email service offering basic functionalities like sending
and receiving emails, contact management, and basic attachment support.

 Zoho Mail: A paid email service geared towards businesses, offering


features like custom domains, team collaboration tools, and enhanced
security options.

34
Limitations of Existing Systems:

While these established email services offer a variety of features, they may have
limitations that your project aims to address. Here are some potential areas for
improvement:

 Limited Customization: Free services may restrict customization options


for user interface or functionalities.

 Scalability for Businesses: Free plans may not offer sufficient storage or
advanced features needed by large businesses.

 Security Concerns: While security measures are in place, some users may
require additional security protocols for sensitive communication.

 Integration Needs: Your project may aim to integrate with specific business
applications or services not offered by existing platforms.

2.3 Proposed System:

This section outlines the proposed solution: a user-friendly and scalable mailing system
developed using PHP. This system aims to address the limitations of basic email systems
identified earlier (refer to section 2.2).

Key Features:
The proposed system will offer the following core functionalities:

Message Composition and Sending: Users can create and compose new messages
with rich text formatting options, similar to existing email services.

35
Attachment Support: Users can attach documents and images to emails for richer
communication, catering to the growing need for sharing various file types.

Recipient Management: The system will provide an address book or contact


management functionality, allowing users to easily select recipients from their saved
contacts or enter email addresses manually.

Outbox and Drafts Management: Separate folders will be implemented for


managing sent emails (outbox) and unfinished messages saved as drafts for future
completion.

Inbox Search Users will be able to search for specific emails within their inbox
using relevant keywords or filters. This will improve message retrieval efficiency by
allowing users to quickly locate important emails.

User-Friendly Interface: The system will prioritize a clean and intuitive interface
with clear navigation. This ensures ease of use for users with varying levels of
technical expertise, making the system accessible to a wider audience.

Scalability and Future Expansion:


The system will be designed with scalability in mind. This means the codebase will be
structured to facilitate future integration of additional features as needed. Here are some
potential areas for future expansion:

Message Scheduling: Users can schedule emails to be sent at a specific date and
time, allowing for more efficient communication planning.

Spam Filtering and Content Moderation: The system can be enhanced with
functionalities to filter out spam messages and potentially implement content
moderation tools for specific use cases (e.g., educational institutions).

Integration with Third-Party Services: The system could be designed to integrate


with other applications or services, such as calendars or CRM systems, for a more
holistic communication experience.
36
Advanced Features: Depending on project scope and future goals, additional
features like email tracking and analytics, custom email templates, or mobile app
accessibility could be explored.

Security Considerations:
The proposed system will prioritize secure communication by adhering to industry
standards. Secure protocols like SMTP Authentication (e.g., SMTP with STARTTLS or
LOGIN) and encryption (e.g., Transport Layer Security (TLS)) will be implemented to
safeguard email transmission and protect sensitive information.

Benefits of the Proposed System:


By developing this user-friendly and scalable mailing system, several benefits can be
achieved:

Improved Communication Efficiency: Enhanced functionalities like message


scheduling and search capabilities will streamline communication workflows.

Increased User Adoption: An intuitive interface will make the system accessible
to a wider range of users.

Scalability for Growth: The system's design will allow for future expansion and
integration with new features as communication needs evolve.

Secure Communication: Secure protocols and encryption will ensure the


confidentiality and integrity of sensitive information transmitted through emails.

37
2.4 Advantage over Existing

Unique Advantages of the Proposed System:


Focus on User Customization: Unlike some free services with limited
customization options, your system might offer greater control over user interface
elements or functionalities.

Scalability for Specific Needs: Existing systems might have limitations on storage
space or advanced features for businesses. Your project can target these needs by
offering a scalable solution designed for specific user groups.

Enhanced Security: You can emphasize the security benefits of your system,
especially if it caters to users who require additional security protocols for sensitive
communication, going beyond what some existing free services provide.

Integration Potential: Highlight the potential for integrating your system with
specific business applications or services not readily available on existing platforms.

Building upon the limitations identified in existing email service providers, our proposed
PHP-based mailing system offers several advantages. The system prioritizes user-
friendliness with a customizable interface, catering to users with varying technical
expertise. Unlike free services with limited storage, this system can be designed to scale
and handle the email volume of growing businesses. Additionally, the focus on secure
communication protocols can address the needs of users who require enhanced security for
sensitive information exchange. Furthermore, the open-source development approach
allows for cost-effective creation and future customization based on evolving user needs.

38
2.5 Justification

Developing a user-friendly and scalable mailing system built with PHP offers several
advantages:

PHP as a Popular Choice: PHP is a widely used and well-supported server-side


scripting language, making it a practical choice for web-based applications.

Open-Source Development: Leveraging open-source libraries and frameworks can


accelerate development and provide access to established solutions.

Scalability and Customization: PHP code can be designed with scalability in mind,
allowing for future feature integration and adaptation to diverse needs.

Cost-Effectiveness: Compared to proprietary solutions, a PHP-based system can be


a more cost-effective option for development and maintenance.

39
Chapter 3 : System
Analysis and Design

40
3.1 Product Perspective:

The Online Mail System is a standalone web application designed to function independently.
It is developed using PHP for the backend and HTML,CSS and JS for the frontend. The system
interacts with a MySQL database for data storage and supports standard email protocols HTTP
for sending and receiving emails.

a) User Perspective:
Many users struggle with cumbersome interfaces, limited features in basic email systems, and
concerns about email security. Our system addresses these challenges by offering: An
intuitive and user-friendly interface that simplifies email management. Valuable features like
message scheduling, advanced search capabilities, and attachment support for richer
communication. Secure communication protocols to ensure the confidentiality and integrity
of sensitive information.

b) System Perspective:
This PHP-based mailing system offers a comprehensive set of functionalities for efficient
email communication. Users can compose and send emails, manage attachments, and
organize contacts within a user-friendly interface. Secure communication protocols ensure the
safety of sensitive information. The system is designed with scalability in mind, allowing for
future expansion and integration of additional features as communication needs evolve.

3.2 Product functions:


 User Registration and Authentication: Secure registration, login, and password
recovery.
 Email Composition and Management: Create, send, receive, and organize
emails.
 Folder Management: Create and manage custom folders.
 Drafts: All not sent messages are transferred to Drafts

41
3.3 User Characteristics:

a) End Users (Primary Users):


Description: These are the individuals who will utilize the system for their daily email
communication needs. They can be anyone from personal users managing their email
inbox to professionals using the system for work-related communication.

Technical Skills: The system should be designed with varying technical skills in mind.
Users may have limited technical knowledge or be comfortable with technology.

Needs:

 User-friendly interface for easy navigation and email management.


 Core functionalities like composing, sending, receiving, and managing
emails.
 Features like search capabilities, attachment support, and potentially message
scheduling (depending on project scope).
 Secure communication for protecting personal or professional information.

b) System Administrators (Secondary Users):


Description: This group consists of users responsible for managing the overall system
health and functionality. They might be IT professionals or system administrators
within an organization using the mailing system.

Technical Skills: System administrators require a strong understanding of server


administration, PHP scripting, and potentially email protocols (SMTP, POP3, IMAP).

Needs:

 Tools for managing user accounts and access permissions.


 Ability to monitor system performance and identify potential issues.
 Options for system maintenance and updates.

42
3.4 User Classes:

This section delves deeper into the concept of user classes within your PHP mailing system
project.

User Roles and Permissions

This approach defines user classes based on roles and permission levels within the
system. Here's a detailed explanation:

 Standard User:
o This class represents the basic user with functionalities like:
 Sending and receiving emails
 Managing contact lists
 Basic search capabilities (e.g., searching inbox by sender or
keyword)
 Accessing and modifying their own email settings
o This class represents the highest user role with full access to system
functionalities, including:
 User management (creating, deleting, modifying user accounts)
 System configuration (setting email server details, storage
quotas)
 Monitoring system performance and logs
 Data backup and recovery .

Benefits of User Roles and Permissions:

 Simpler Implementation: This approach can be easier to implement for


less complex systems.
 Clear Access Control: User roles clearly define what actions each user type
can perform.
 Scalability: Additional user roles with specific permissions can be easily
added as the system evolves.

43
3.5 Tools and Environment:

This section delves into the heart of your online mail system project – the tools and
environment that will orchestrate its creation. Here, we explore the key players in this
technological symphony:

 Front End: - HTML, JAVASCRIPT, CSS


 Back end: - PHP
 Database: - MySQL
 IDE:- VS CODE

1. Front-End Development: The Stage

 HTML: The Foundation: Imagine HTML as the sturdy framework of your online
mail system. It defines the structure and layout, laying the groundwork for all the
elements users will interact with. Headings, paragraphs, buttons, and links – all are
meticulously placed using HTML tags, forming the skeleton of your web pages.

 CSS: The Stylist: Now comes the magic! CSS transforms the bare-bones HTML
structure into a visually appealing interface. It's like a skilled designer applying
colors, fonts, and layouts, breathing life into the web pages. With CSS, you can
define the look and feel of every element, ensuring a cohesive and user-friendly
experience.

 JavaScript: The Interactive Maestro: JavaScript injects dynamism into your


online mail system. It's the conductor that orchestrates user interactions. Imagine a
user clicking a button to compose an email. JavaScript captures this action, triggers
the appropriate functionality, and updates the page dynamically, eliminating the
need for constant page refreshes.

44
2. Back-End Development: The Engine Room

 PHP: The Powerhouse: PHP, the server-side scripting language, serves as the
engine powering your online mail system. It handles all the behind-the-scenes work.
When a user interacts with the interface, PHP springs into action. It processes data,
interacts with the database, and generates the dynamic HTML content that the user
sees.

3. Database Management System: The Data Vault

 MySQL: The Secure Guardian: MySQL, the chosen relational database


management system (RDBMS), acts as the secure vault for your online mail
system's data. It meticulously stores and organizes critical information like user
accounts, email messages, contacts, and potentially attachments. PHP acts as the
key that unlocks this vault, allowing it to retrieve, store, and manipulate data as
needed.

4. Integrated Development Environment (IDE) (Optional):

 Visual Studio Code: The Collaborative Conductor (Optional): While not


mandatory, an IDE like Visual Studio Code can be your development companion.
It functions as a comprehensive workspace, offering features like syntax
highlighting, code completion tools, and debugging utilities. With an IDE, you can
focus on composing the code symphony, leaving the technical details to the
environment.

45
3.6 Operating Environment :
The operating environment refers to the software platform that provides the
foundation for developing and running your online mail system. Here's a
breakdown of the key components:

Operating System (OS):


 Recommended: A recent version of Windows (e.g., Windows 10 or 11), is
highly recommended. These operating systems offer better security,
performance, and compatibility with development tools compared to older
versions of Windows (like XP or 7) that are no longer supported.
 Justification:
o Security: Newer operating systems receive regular security updates,
crucial for protecting your development environment from
vulnerabilities.
o Performance: Modern operating systems are optimized for efficient
development workflows, ensuring smoother operation.
o Development Tool Compatibility: Most development tools (code
editors, web servers, database management tools) are well-
supported on these platforms.

Additional Software:
 Web Server (Optional for Development): For development and testing
purposes, consider installing a web server like Apache or Nginx on your
local machine. This allows you to simulate a real-world environment where
your online mail system would run on a web server after deployment.
 Development Tools:
o Code Editor: A code editor like Visual Studio Code, Sublime Text, or
Atom provides a user-friendly environment for writing and editing
code (HTML, CSS, JavaScript, PHP). Syntax highlighting, code
completion, and debugging features can streamline development.

46
 Database Management System: MySQL is a popular open-source relational
database management system (RDBMS) well-suited for this project. You'll
need a MySQL server running on your development machine or have access
to a remote MySQL database for storing and managing your online mail
system's data.

Development Environment Considerations:


 Integrated Development Environment (IDE) (Optional): While not
essential, an IDE like Visual Studio Code can offer a more comprehensive
development environment. It combines features like code editing,
debugging tools, version control integration, and project management tools
into a single platform.
 Development Machine Specifications: Ensure your development machine
has sufficient processing power (CPU), memory (RAM), and storage space
(HDD/SSD) to handle the development tools and project requirements
comfortably. Refer to the hardware requirements section of your project
documentation for specific recommendations .

3.7 Assumptions and Dependencies:

Assumptions:

 Technical Expertise: This project assumes a basic understanding of web


development concepts, HTML, CSS, JavaScript, and PHP. Familiarity with
databases (MySQL) would be beneficial.
 Available Resources: Access to a development machine with necessary
hardware and software (mentioned previously) is assumed.
 User Base and Usage Patterns: The initial project scope might target a
limited user base with basic email functionalities. Advanced features catering
to extensive email management needs can be explored later.

47
Dependencies:

 External Libraries and Frameworks (Optional): While not strictly


mandatory, utilizing pre-built libraries or frameworks can significantly
enhance development efficiency. These might include:
o JavaScript frameworks like React or Angular for complex user
interfaces.
o Security libraries for encryption and authentication functionalities.
o Data reporting tools for data visualization and analysis.
 Web Server: For testing purposes, a web server like Apache or Nginx needs
to be installed and configured on your development machine to simulate a
real-world environment.
 Database Management System: The project hinges on a functional MySQL
database to store and manage user data, emails, contacts, and potentially
attachments (depending on project scope).
 Third-Party Services (Optional): Certain features might involve integrating
with external services, such as:
o Email relay services for reliable email delivery.
o Cloud storage solutions for managing large attachments efficiently.

Addressing Assumptions and Dependencies:

 Mitigate Expertise Gaps: If I ever lack in specific technical skills, leverage


online tutorials, documentation, or consider collaborating with teacher who
possess the necessary expertise.
 Manage Resource Constraints: Optimize code to reduce hardware resource
requirements. Explore cloud-based development environments or lightweight
development tools if my machine has limitations.
 Phased Development: Start with a basic version focusing on core
functionalities. Gradually introduce advanced features as I gain experience
and identify user needs.

48
 Evaluate Dependencies: Carefully assess the need for external libraries,
frameworks, or services. Consider trade-offs between development time,
complexity, and potential licensing costs as they are also optional.

Conclusion:

By acknowledging these design and implementation constraints and actively


implementing solutions, I can develop a robust and user-friendly online mail system.
Remember, a successful project is that which balances functionality with a positive
user experience, manages security concerns, and ensures scalability for future
growth.

49
Chapter-4 System
Implementation and
testing

50
4.1 System Requirements:

Minimum Hardware Requirements:

 Processor: While a Pentium-IV 1.7 GHz can technically work for development, a
more modern processor (e.g., Intel Core i3 or AMD Ryzen 3) is highly recommended
for smoother development and testing.
 RAM: 2GB of RAM is a good minimum for development purposes. 8GB or more
would be ideal for improved performance, especially when running multiple
programs simultaneously.
 HDD (Hard Disk Drive): While 20GB might be sufficient for the initial
development, consider using a Solid State Drive (SSD) with at least 128GB of
storage. SSDs offer significantly faster loading times compared to traditional HDDs..

Software Requirements:

 Operating System: While Windows 7/XP might technically work, these operating
systems are no longer supported by Microsoft and have security vulnerabilities. It's
strongly recommended to use a more recent version of Windows (e.g., Windows 10
or 11) or a different operating system like macOS or Linux.
 Front-End Development Tools: HTML5 and CSS3 are essential for building the
web pages. Consider using a modern code editor with features like syntax
highlighting and code completion (e.g., Visual Studio Code, Sublime Text).
Additionally, a JavaScript framework like React or Angular could be explored for
more complex user interfaces (optional).
 Back-End Development Tool: PHP remains the primary choice for server-side
scripting.
 Database Management System: MySQL is a good option for the database.
 Data Reporting Tool (Optional): While "Data Report" is a generic term, some
popular data reporting tools include phpMyAdmin. This tool can help me visualize
and analyze data stored in the MySQL database .

51
4.2 Security Requirement
Building on the previous outline, here's a more detailed breakdown of security
requirements for your online mail system project:

1. User Authentication and Authorization:


 Strong Password Hashing: Implement robust password hashing algorithms
like bcrypt or Argon2 to securely store user passwords. Never store
passwords in plain text.
 Secure Login: Enforce strong password complexity requirements and
implement two-factor authentication (2FA) for an additional layer of login
security. Consider using secure login protocols like HTTPS with TLS to encrypt
login data during transmission.

2. Data Security:
 Data Encryption: Consider encrypting user data at rest (stored on the server)
and in transit (sent over the internet) using strong encryption algorithmsThis
can include email content, attachments, and user information.
 Regular Backups: Implement a secure backup strategy to regularly back up
user data and system configurations. This allows for data recovery in case of
security incidents or system failures.

3. System Security:
 Secure Coding Practices: Follow secure coding practices to avoid common
vulnerabilities in your PHP code. This includes proper input validation, output
encoding, and avoiding practices like using file permissions that are too
permissive.
 Web Server Configuration: Configure your web server securely to prevent
unauthorized access and common attacks like directory traversal or cross-
site scripting (XSS).
 Regular Security Updates: Maintain the operating system, web server
software, PHP, and MySQL with the latest security updates to address known
vulnerabilities.

52
4. Secure Communication Channels:
 HTTPS with TLS: Enforce HTTPS with Transport Layer Security (TLS) for all
communication between the web browser and the mail server. This encrypts
data in transit, protecting it from eavesdropping or tampering.
 Secure Email Protocols: Consider using secure email protocols like SMTPS
(Secure SMTP) for sending emails and IMAPS (IMAP over SSL) or POP3S
(POP3 over SSL) for receiving emails. These protocols encrypt email content
during transmission.

5. Security Audits and Monitoring:


 Regular Security Audits: Conduct regular security audits to identify potential
vulnerabilities in the system. This might involve using automated scanning
tools or penetration testing by security professionals.
 Security Monitoring: Implement security monitoring tools to track
suspicious activity and potential security incidents.
 Incident Response Plan: Develop a clear incident response plan that outlines
procedures for identifying, containing, and recovering from security
breaches.

6. User Education and Awareness:


 Strong Password Practices: Educate users on creating strong passwords and
the importance of not sharing them with anyone.
 Phishing Awareness: Inform users about phishing scams and how to identify
suspicious emails or websites. Encourage them to be cautious when clicking
on links or opening attachments from unknown senders.
 Reporting Security Concerns: Provide a mechanism for users to report
suspicious activity or potential security vulnerabilities they encounter while
using your online mail system.

53
4.3 Design Requirements:
1. User Interface (UI):

 Intuitive and Clean Design: Prioritize a clear and user-friendly interface that
is easy to navigate and understand, even for non-technical users.
 Responsiveness: Ensure the interface adapts seamlessly across various
devices (desktops, tablets, smartphones) to cater to diverse user preferences
and screen sizes.
 Visual Hierarchy: Use visual cues like color, size, and spacing to guide users'
attention towards essential features and functionalities.
 Accessibility: Consider accessibility guidelines to ensure the interface is
usable by people with disabilities. This includes features like keyboard
navigation, screen reader compatibility, and proper color contrast.

2. User Experience (UX):

 Simple and Efficient Workflow: Design an email management workflow


that is streamlined and efficient. Composing, sending, receiving, organizing,
and searching for emails should be straightforward and intuitive.
 Clear Feedback: Provide clear visual and auditory feedback to users about
their actions (e.g., confirmation messages after sending an email, error
messages highlighting incorrect inputs).
 Customization Options (Optional): Consider offering basic customization
options like themes, layouts, or notification preferences to cater to individual
user preferences.

3. Functionality:

 Essential Features: Focus on core email functionalities like composing,


sending, receiving, replying, forwarding, and deleting emails.
 Organization Tools: Provide tools for organizing emails, such as folders,
labels, and the ability to mark emails as important or unread.
 Attachment Handling: Enable users to attach files to emails with limitations
on file size and type to prevent misuse.
 Draft Management: Allow users to save draft emails for later completion
and editing.

54
4. Scalability and Performance:

 Efficient Data Management: Design the system to efficiently manage large


volumes of emails and user data without compromising performance.
 Fast Loading Times: Ensure the interface loads quickly and responds
promptly to user actions, maintaining a smooth user experience.
 Planned Future Growth: Consider a scalable architecture that can
accommodate a growing user base and increasing email traffic in the future.

4.4 User Modules:


1. Dashboard: This is the landing page of the web application and serves as a starting
point for users. It might include a brief introduction to the system, key features, and
links to other sections like Inbox, Sent emails, Search, and Contact Us.

2. Register User: This module allows new users to create an account within the
online mail system. Users will likely provide information like name, email address,
and a password during registration.

3. Login Module: Registered users can access their email accounts by entering their
username/email and password through this module. Successful login grants users
access to manage their email activities like sending, receiving, and composing
emails.

4. Mail Module: This core module handles email functionalities:

* Inbox: This section displays all emails received by the user. Users can view, open,
and manage received emails within their inbox.

* Sent: This section stores copies of all emails sent by the user. Users can access
and review previously sent emails.

* Draft: This feature allows users to save partially composed emails for later
completion and editing. Users can revisit drafts, finalize them, and send them at their
convenience.

5. Change Password/Forgot Password Module: This module provides


functionalities for password management:

55
* Change Password: Users can update their existing password by entering their
current password and creating a new, secure password.

6. Edit Profile: This module allows users to update and maintain their profile
information. Users can edit details like name, email address, phone number, and
potentially add additional information like hobbies or a profile picture.

7. Logout Module: This module provides a secure way for users to terminate their
current session and log out of the online mail system. This ensures user privacy and
prevents unauthorized access to their email account.

8. Update Module: This module keeps users informed about the system's status.
Users can check for updates related to the online mail system, such as new features,
bug fixes, security patches, or any important announcements from the administrator.

9. Gmail Integration: This advanced module allows users to connect their existing
Gmail account with the online mail system. This functionality enables users to
import and export emails between the two platforms, potentially offering a more
unified email management experience.

4.5 Feasibility Study:

A feasibility study is carried out to select the best system that meets performance
requirements. Feasibility is the determination of whether or not a project is worth
doing. The process followed in making this determination is called a feasibility study.
This type of study determines if a projectcan and should be taken. Since the feasibility
study may lead to the commitment of largeresources, it becomes necessary that it
should be conducted competently and that no fundamental errors of judgment are
made.

56
a) Technical feasibility:

This is concerned with specifying equipment and software that will successfully
satisfy the user requirement. The technical needsof the system may include:

Server Capacity:

 Processing Power (CPU): Email functionalities like sending, receiving,


searching, and spam filtering require processing power. Analyze the server's
CPU specifications (number of cores, clock speed) to estimate its ability to
handle the anticipated workload. Consider potential limitations if the user base
grows significantly.
 Memory (RAM): The server's RAM plays a crucial role in handling multiple
user requests simultaneously. Evaluate the available RAM and its capacity to
accommodate the memory needs of the email server software and the expected
number of concurrent users.
 Storage Capacity: Emails, attachments, and user data require storage space.
Analyze the server's available storage and project future storage needs based
on the anticipated user base and email volume. Consider implementing data
archiving strategies or scaling storage if necessary.

Network Bandwidth:

 Email Traffic Volume: Estimate the average email size and the projected
number of emails sent and received daily. This will help determine the overall
bandwidth required to handle email traffic efficiently.

57
b) Operational Feasibility:
What organizational structures are disturbed? What new skills will be required? Do
the existing staff members havethese skills? If not, can they be trained in due course
of time? Such considerations are likely to critically affect the nature and scope ofthe
eventual recommendations. This feasibility study is carried out by a small group of
people who are familiar with information system techniques, whes understand the
parts of the business that are relevant to the project and are skilled in system analysis
and design. Process .

 User training might be simpler, focusing on basic message sending, receiving


and organization functionalities.
 Change management can emphasize the benefits of improved communication
and collaboration within the organization.
 Familiarity with Computerized Systems: Since the users are already
comfortable with computerized systems, they'll likely adapt quickly to the
new online mail system, especially if the interface is user-friendly and
intuitive.
 Improved Interactivity: Eliminating the need for manual commands and
offering a more interactive interface will significantly enhance user
experience and make communication more efficient.
 User-Friendly Features: A system that generates clear and helpful messages
during operation will minimize confusion and frustration for users, leading to
faster adoption and increased satisfaction.
 Training and Support: Even with a user-friendly system, providing basic
training materials or short tutorials can help users get acquainted with the new
functionalities and features. Having a support system in place (knowledge
base, FAQs, or a ticketing system) to address user queries will further ease the
transition.

c) Economic Feasibility:
 Reduced Development Costs: Having a trainee student develop the system
significantly minimizes development costs, making it a financially attractive
option for the organization.
 Leveraging Existing Infrastructure: Utilizing the existing server-client
setup and avoiding the need for additional software eliminates hardware and
software investment costs.

58
 Improved Efficiency: The system's user-friendliness and potential for faster
communication can lead to time savings for employees, translating to overall
economic benefits.
 Minimal Training Costs: Since the employees are already familiar with
computerized systems, the learning curve for the new system should be
minimal, reducing training costs.
 User-Friendly Design: The system's interactive nature, self-explanatory
features, and user manuals can minimize the need for extensive support,
potentially reducing operational costs.

Here are some additional points to consider for a more comprehensive financial
feasibility analysis:

 Maintenance and Updates: While development costs might be minimal


initially, factor in potential future costs associated with system maintenance,
updates, or bug fixes to ensure the system's functionality and security over
time.
 Scalability: If the user base or message volume grows significantly, consider
potential future costs associated with scaling the system (upgrading server
capacity, storage) to maintain performance.

59
4.6 System Testing:
System testing is a crucial phase in the development process that ensures your online
messaging system functions as intended and meets user requirements. Here's a
breakdown of key testing approaches:

1. Unit Testing:

 The developer (trainee student) should conduct unit testing to verify the
functionality of individual modules (e.g., login, message sending, message
display) in isolation. This helps identify and fix bugs early in the development
cycle.

2. Integration Testing:

 Once individual modules are functional, test them together to ensure they
interact seamlessly. This includes testing user login across different browsers,
sending messages between users, and other functionalities that involve
multiple modules working together.

3. Functionality Testing:

 This testing focuses on verifying if the system delivers the promised features
and functionalities according to the project requirements. Test all core
functionalities like user registration, login, message sending/receiving,
message organization (folders, labels), and basic user profile management.

4. Usability Testing:

 Involve a representative group of users from your organization to test the


system's usability. This helps identify any user interface (UI) issues that might
hinder user experience or make the system difficult to navigate.
 Observe how users interact with the system, identify areas for improvement,
and refine the UI/user flow based on their feedback.

5. Security Testing:

 Security testing is critical to ensure the system protects user data and messages
from unauthorized access. This might involve simulating potential attacks
(e.g., SQL injection, password cracking) and identifying vulnerabilities.

60
 Implement security measures like strong password hashing, user
authentication, and secure communication protocols (HTTPS) to mitigate
security risks.

6. Performance Testing:

 Test the system's performance under various loads (multiple users, high
message volume) to ensure it can handle real-world usage scenarios. This
helps identify performance bottlenecks and optimize the system for efficient
operation.

7. Compatibility Testing:

 Test the system's compatibility across different web browsers, operating


systems, and devices (desktops, laptops, mobile phones) that users might
access the system from. This ensures a consistent and functional experience
for all users regardless of their devices.

Additional Considerations:

 Test Plan and Documentation: Develop a comprehensive test plan outlining


the scope and objectives of each testing phase. Document test cases, expected
results, and any identified bugs or issues.
 Regression Testing: After fixing bugs or implementing new features,
conduct regression testing to ensure existing functionalities haven't been
broken in the process.

61
Chapter-5 Conclusion

62
In conclusion, online mail systems have become an essential communication tool for
colleges. They offer a multitude of benefits, including improved efficiency, accessibility,
organization, and collaboration. By [mention specific features of the system you
discussed], the college can further enhance communication and information sharing among
students, faculty, and staff. However, it's crucial to address potential drawbacks like
security concerns and information overload. By implementing robust security measures
and promoting responsible email etiquette, the college can ensure a safe and effective
online mail environment for the entire academic community.

 Online mail systems are essential for colleges because they improve
communication efficiency, accessibility, organization, and collaboration.
 Specific features you discussed in your report can further enhance these
benefits.
 It's important to address security concerns and information overload through
security measures and responsible email use.

5.1 Maintenance:

Once the online mail system is delivered and deployed, it enters the maintenance
phase. Even after thorough testing during development, some errors might not
appear immediately. During its usage by the end-users with actual data, certain errors
may emerge. Therefore, some residual errors or bugs remain in the system that must
be addressed as they are discovered. Many of these issues only surface after the
system has been in operation for some time. These errors, once discovered, need to
be removed promptly to ensure the smooth running of the system, leading to
necessary software changes.

Although maintenance is not part of the initial software development process, it is


an extremely important activity in the life cycle of a software product. Maintenance
involves understanding the existing software (code and related documents),
assessing the impact of changes, implementing the changes in both the code and
documentation, testing the new parts, and retesting the old parts.

63
For the successful and smooth running of the online mail system, maintenance is a
crucial part of the project. Any error that hinders the functionality of any part of the
system can lead to a negative impression of the developer and can disrupt user
experience. Therefore, timely and effective maintenance is essential to ensure the
online mail system remains reliable, secure, and efficient.

Corrective Maintenance:

 Focuses on fixing existing problems. This includes debugging and


resolving issues reported by users, patching security vulnerabilities
discovered during operation, and correcting functionalities that aren't
working as intended.

Adaptive Maintenance:

 Adapts the system to accommodate changes in the environment. This


involves updating the system to support new browsers or operating systems,
modifying it to comply with new regulations or standards, and ensuring
compatibility with updated third-party services or APIs the mail system
relies on.

Perfective Maintenance:

 Aims to improve the overall performance and maintainability of the


system. This includes optimizing code for better speed and efficiency,
enhancing the user interface based on user feedback to make it more user-
friendly, and adding new features to improve the user experience.

Preventive Maintenance:

 Focuses on preventing future issues. This involves refactoring code to


reduce complexity and improve readability, regularly updating libraries and
dependencies used by the system to ensure they are secure and up-to-date,
and conducting regular security audits and implementing best practices to
identify and address potential security risks before they become problems.

64
5.2 Limitations:

While the online mail system developed in PHP provides essential email
functionalities, it has several limitations that should be acknowledged:

1. Limited Feature Set:

 Basic Email Functionality: The system includes basic email functions


like sending, receiving, and inbox management, but lacks advanced
features such as email filtering, search capabilities, and threaded
conversations.

2. Security Concerns:

 Basic Security Measures: While the system includes basic security


measures like password hashing and HTTPS, it lacks more advanced
security features such as two-factor authentication (2FA), email
encryption, and spam filtering.

3. Scalability Issues:

 Performance with High Volume: The system may not perform


optimally with a large number of users or a high volume of emails due
to limitations in its current design and infrastructure.
 Database Limitations: The current database schema and queries may
not be optimized for handling large datasets, leading to performance
bottlenecks.

4. User Interface Limitations:

 Basic UI Design: The user interface is functional but basic, lacking


modern UI/UX design principles. This could affect user satisfaction and
engagement.
 No Mobile Optimization: The system is not optimized for mobile
devices, which could limit accessibility and usability for users
accessing the system from smartphones or tablets.

65
5. Lack of Integration:

 No Integration with Other Email Protocols: The system does not


support integration with standard email protocols like IMAP and POP3,
limiting its ability to synchronize with other email services.
 No Third-Party Integrations: There are no integrations with third-party
services such as calendars, contacts management, or other productivity
tools

5.3 Future Scope :

Feature Enhancements

 File Attachments: Implement support for sending and receiving file


attachments, allowing users to share documents, images, and other files.
 Email Filtering and Search: Introduce advanced email filtering options and
a robust search functionality to help users manage and locate their emails
efficiently.
 Threaded Conversations: Develop support for email threading to group
related messages together, improving readability and context.

Enhanced Security Measures

 Two-Factor Authentication (2FA): Add 2FA to enhance user account


security.
 Email Encryption: Implement end-to-end encryption for emails to protect
the content from unauthorized access.
 Spam and Phishing Filters: Integrate advanced spam and phishing detection
algorithms to filter out malicious emails.

Scalability and Performance Improvements

 Load Balancing: Implement load balancing techniques to distribute traffic


evenly across servers, improving performance during peak usage times.
 Database Optimization: Optimize database schema and queries for better
performance with large datasets.

66
User Interface and Experience Enhancements

 Responsive Design: Redesign the user interface to be fully responsive,


ensuring usability on mobile devices, tablets, and desktops.
 User Feedback Mechanisms: Integrate feedback tools to collect user input
on the interface and features for continuous improvement.
 Customizable Themes: Allow users to customize the look and feel of their
email interface with different themes and settings.

Data Management and Compliance

 Data Backup and Recovery: Implement robust data backup and recovery
solutions to prevent data loss and ensure business continuity.
 Data Privacy Compliance: Ensure the system complies with data privacy
regulations such as GDPR and CCPA, providing users with control over their
data.

67
Appendix

68
A.1 Data Flow diagram (DFD):
A Data Flow Diagram (DFD) visually represents the flow of data within your online
messaging system. Here's a breakdown of the DFD for your system:

a) Context Level DFD(Level 0):

This high-level view depicts the entire system and its interaction with external
entities.

 External Entity: Users


 Data Flow (In): Login credentials, message content, recipient information
 Data Flow (Out): System messages (login success/failure, message delivery
status)

Fig-A.1 -: 0 level DFD (Context-level DFD)

69
b) Level 1 DFD

Fig-A.2 -: 1 level DFD

70
c) Level 2 DFD

Fig-A.3 -: 2 level DFD

71
A.2 ER Diagram

Fig A.4 -: ERD

72
A.3 Use Case

Fig A.4 -: USE CASE

73
A.4 Class Diagram

Fig-A.4 -: Class Diagram

74
A.5 Database Design

1- USER INFO

COLUMN TYPE NULL CONSTRAINTS


User_id(primary) Int (11) No Primary Not Null
User_name Char(50) No
password Varchar(30) No
Gender Enum(m,f) No
Dob Date No

 `user_jd` int(11) NOT NULL AUTO_INCREMENT


 PRIMARY KEY (`user_jd`),
 UNIQUE KEY `user_name`
 KEY `gender` (`gender`)

2- LATESTUPD

COLUMN TYPE NULL CONSTRAINTS


upd_id(primary) Int (11) No Primary key
Title varChar(50) No
Content Longtext() No
Image Varchar(50) No
Data Data No

 `upd_id` int(11) NOT NULL AUTO_INCREMENT,


 PRIMARY KEY (`upd_id`)

75
3- Mails-:

COLUMN TYPE NULL CONSTRAINTS


Mail_id(primary) Int (11) No Primary key
Rec_id varChar(50) No
Sen_id Varchar(30) No
Sub Varchar(50) No
Msg longtext() No
Attachment Longtext() No
recDT Data() No
 `mail_id` int(11) NOT NULL AUTO_INCREMENT,
 PRIMARY KEY (`mail_id`)

4-DRAFT-:
COLUMN TYPE NULL CONSTRAINTS
draft_id(primary) Int (11) No
user_id varChar(50) No
Sub Varchar(30) No
msgdt Data() No
Msg longtext() No
attachment Longtext() No

 `draft_id` int(11) NOT NULL AUTO_INCREMENT,


 PRIMARY KEY (`draft_id`)

76
USER INTERFACE

77
1- Homepage

78
2-Signup/Register

79
3-Welcome

80
4. Login

81
5. Compose

82
6. Sent

83
7. Draft

84
8. Gmail

85
9. Change password

86
10. Update

87
11. Inbox

88
12. Update profile & Logout

89
Codes

90
1. [Link]

<?php session_start();
error_reporting(1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Mail Server</title>
<link href="[Link]
rel="stylesheet" integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
<style>
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: #fff; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.disp {color:black}
</style>

</head>

<body>
<header class="bg-primary text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">yumail</h1>
<nav class="header-nav">
<a href="[Link]?chk=about">ABOUT US</a>

<a href="[Link]?chk=contact">CONTACT US</a>


</nav>
</div>
</header>

<main class="container py-4">


<div class="jumbotron bg-body-tertiary rounded-3 position-relative">

91
<video class="w-100 h-100" autoplay muted loop>
<source src="videoemail.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<div class="container-fluid py-5 text-center text-white position-relative">
<h1 class="display-5 fw-bold disp">Welcome to <span class="color-
blue">yumail</span></h1>
<p class="col-md-8 mx-auto fs-4 disp">Experience the future of email with our innovative
service. Fast, secure, and user-friendly.</p>
</div>
</div>

<div class="row align-items-md-stretch mb-4">


<div class="col-md-6">
<div class="h-100 p-5 text-bg-dark rounded-3">
<h2>Secure and Reliable</h2>
<p>Our email service uses top-notch security protocols to ensure your emails are always
safe and accessible.</p>
<a href="[Link]"><button class="btn btn-outline-light"
type="button">Login</button></a>
</div>
</div>
<div class="col-md-6">
<div class="h-100 p-5 bg-body-tertiary border rounded-3">
<h2>Easy to Use</h2>
<p>With a simple and intuitive interface, managing your emails has never been easier.
Sign up today and see the difference.</p>
<a href="[Link]"> <button class="btn btn-outline-secondary"
type="button">Sign Up Now</button></a>
</div>
</div>
</div>

</main>

<aside class="container py-4">


<div class="marquee">
<marquee direction="up" behavior="alternate" onmouseover="stop()"
onmouseout="start()">
<a href="[Link]?chk=7">Latest Updates</a>
</marquee>
</div>
</aside>

<footer class="bg-light text-center py-3">


<p>© 2024 My Mail Server</p>

92
<div>
<a href="#" class="text-body-secondary">Privacy Policy</a> |
<a href="#" class="text-body-secondary">Terms of Service</a>
</div>
</footer>

<script src="/docs/5.3/dist/js/[Link]" integrity="sha384-


YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</body>
</html>

93
2. [Link]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Me</title>

<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 0;
}
.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h2 {
background: #99FF33;
padding: 5px;
text-align: left;
margin-top: 0;
border-radius: 5px 5px 0 0;
}
p{
padding: 10px 0;
}
img {
display: block;
max-width: 100%;
height: auto;
border-radius: 50%; /* Apply rounded corners */
margin-bottom: 20px;
}
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: black; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }

94
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.disp {color:black}
</style>
</head>
<body>
<header class="bg-primary text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">My Mail Server</h1>
<nav class="header-nav">
<a href="[Link]?chk=about">Home</a>
<a href="[Link]?chk=5"></a>
<a href="[Link]?chk=contact">CONTACT US</a>
</nav>
</div>
</header>
<div class="container">
<h2>About Me</h2>
<img src="[Link]
[Link]/images?q=tbn:ANd9GcQ0BTJdz5vBa8uYzvXPWnC4CV5Zf6XQ2lVIcSBe0g
q59Q&s" alt="Utkarsh Kumar" />
<p>Hello</p>
<p>Utkarsh-Kumar this side.</p>
<p>
I am currently pursuing my BCA degree from Ignou.
This is my last semester project, Mailserver,
in which I have demonstrated how a mail system actually works.
</p>
<p>Have a look.</p>
<p>Thank you.</p>
</div>
</body>
</html>

95
3. [Link]

<?php

include_once('[Link]');
error_reporting(1);
$err = "";

if(isset($_SESSION['sid'])) {
$id = $_SESSION['sid'];
} else {
header('Location: [Link]');
exit;
}

if(isset($_POST['chngP'])) {
$op = $_POST['op'];
$np = $_POST['np'];
$cp = $_POST['cp'];

if($op == "" || $np == "" || $cp == "") {


$err = "Fill all the fields first";
} else {
$sql = "SELECT * FROM userinfo WHERE user_name ='$id'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);

if($row['password'] == $op) {
if($np == $cp) {
$sql = "UPDATE userinfo SET password='$np' WHERE user_name='$id'";
$result = mysqli_query($conn, $sql);
echo "Password updated...";
} else {
$err = "New password doesn't match the confirm password";
}
} else {
$err = "Wrong old password";
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

96
<title>Change Password</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
margin: 0;
padding: 0;
}

h1 {
text-align: center;
margin-bottom: 20px;
}

form {
width: 100%;
max-width: 400px; /* Limit form width for better readability */
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

label {
font-weight: bold;
}

input[type="password"] {
width: calc(100% - 22px);
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 4px;
}

input[type="submit"] {
width: 100%;
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}

97
.error-message {
color: red;
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<form method="post">
<h1>Change Password</h1>
<label for="op">Old Password:</label>
<input type="password" id="op" name="op" required><br>
<label for="np">New Password:</label>
<input type="password" id="np" name="np" required><br>
<label for="cp">Confirm Password:</label>
<input type="password" id="cp" name="cp" required><br>
<input type="submit" name="chngP" value="Change Password">
<p class="error-message"><?php echo $err; ?></p>
</form>
</body>
</html>

98
4. [Link]

<?php
include_once('[Link]');

if (session_status() === PHP_SESSION_NONE) {


session_start();
}

if (!isset($_SESSION['sid'])) {
header('Location: [Link]');
exit();
}

$id = $_SESSION['sid'];

if (isset($_POST['send'])) {
$to = $_POST['to'] ?? '';
$sub = $_POST['sub'] ?? '';
$msg = $_POST['msg'] ?? '';
$file = $_FILES['file']['name'] ?? '';

if ($to == "" || $sub == "" || $msg == "") {


$err = "Fill the related data first";
} else {
$stmt = $conn->prepare("SELECT * FROM userinfo WHERE user_name = ?");
$stmt->bind_param("s", $to);
$stmt->execute();
$result = $stmt->get_result();
$count = $result->num_rows;

if ($count == 1) { // Ensure recipient exists


if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != "") {
$file_name = basename($_FILES['file']['name']);
$file_tmp = $_FILES['file']['tmp_name'];

$upload_dir = __DIR__ . '/uploads/';


if (!is_dir($upload_dir)) {
mkdir($upload_dir, 0755, true);
}
$file_path = $upload_dir . $file_name;

if (move_uploaded_file($file_tmp, $file_path)) {
$stmt = $conn->prepare("INSERT INTO usermail (rec_id, sen_id, sub, msg,
attachment, recDT) VALUES (?, ?, ?, ?, ?, NOW())");

99
$stmt->bind_param("sssss", $to, $id, $sub, $msg, $file_name);
$stmt->execute();
$err = "message send....";
} else {
$err = "Failed to upload attachment.";
}
} else {
// Handle case where no attachment is uploaded
$stmt = $conn->prepare("INSERT INTO usermail (rec_id, sen_id, sub, msg, recDT)
VALUES (?, ?, ?, ?, NOW())");
$stmt->bind_param("ssss", $to, $id, $sub, $msg);
$stmt->execute();
$err = "Message sent...";
}
} else {
$err = "Recipient does not exist.";
}
}
} elseif (isset($_POST['save'])) {
$sub = $_POST['sub'] ?? '';
$msg = $_POST['msg'] ?? '';
$file = $_FILES['file']['name'] ?? '';

if ($sub == "" || $msg == "") {


$err = "<font color='red'>Fill subject and message first</font>";
} else {
$stmt = $conn->prepare("INSERT INTO draft (user_id, sub, attach, msg, date) VALUES (?,
?, ?, ?, NOW())");
$stmt->bind_param("ssss", $id, $sub, $file, $msg);
$stmt->execute();
$err = "Message saved...";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gmail Compose</title>
<link href="[Link]
rel="stylesheet" integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
<style>
body {
font-family: Arial, sans-serif;

100
}
.container {
max-width: 600px;
margin: auto;
padding: 20px;
}
input[type="text"],
input[type="file"],
textarea {
width: 100%;
padding: 8px;
margin: 5px 0;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type="submit"],
input[type="reset"] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
margin-right: 10px;
}
input[type="submit"]:hover,
input[type="reset"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="container">
<form method="post" enctype="multipart/form-data">
<div class="mb-3">
<label for="to" class="form-label">To</label>
<input type="text" class="form-control" id="to" name="to" required>
</div>
<div class="mb-3">
<label for="cc" class="form-label">Cc</label>
<input type="text" class="form-control" id="cc" name="cc">
</div>
<div class="mb-3">
<label for="sub" class="form-label">Subject</label>
<input type="text" class="form-control" id="sub" name="sub" required>
</div>

101
<div class="mb-3">
<label for="file" class="form-label">Upload your file</label>
<input type="file" class="form-control" id="file" name="file">
</div>
<div class="mb-3">
<label for="msg" class="form-label">Message</label>
<textarea class="form-control" id="msg" name="msg" rows="8" required></textarea>
</div>
<div class="mb-3">
<input type="submit" class="btn btn-primary" name="send" value="Send">
<input type="submit" class="btn btn-secondary" name="save" value="Save">
<input type="reset" class="btn btn-danger" value="Cancel">
</div>
</form>
</div>
</body>
</html>

102
5. [Link]

<?php

$servername = "localhost";
$username = "root";
$password = "";
$database = "10am";

$conn = new mysqli($servername, $username, $password, $database);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

?>

103
6. [Link]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Me</title>
<link href="[Link]
rel="stylesheet" integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
<style>
table {
width: 90%;
margin: auto;
border-collapse: collapse;
border-radius: 5px;
overflow: hidden; /* Ensures border-radius is applied */
}
th, td {
padding: 10px;
border: 1px solid #CCCCCC;
}
th {
background: #CCCCCC;
color: #0000FF;
text-align: center;
}
td:first-child {
font-weight: bold;
width: 20%;
}
a{
color: blue;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: black; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }

104
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.disp {color:black}
</style>
</head>
<body>
<header class="bg-primary text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">My Mail Server</h1>
<nav class="header-nav">
<a href="[Link]?chk=about">Home</a>
<a href="[Link]?chk=5"></a>
<a href="[Link]?chk=about">About-Me</a>
</nav>
</div>
</header>
<table>
<tr>
<th colspan="2">Contact Me</th>
</tr>
<tr>
<td>Name</td>
<td>Utkarsh Kumar</td>
</tr>
<tr>
<td>Mobile</td>
<td>7895099154</td>
</tr>
<tr>
<td>Address</td>
<td>Kuldeep Vihar Colony, Aligarh</td>
</tr>
<tr>
<td>Email</td>
<td>ukutkarsh8279@[Link]</td>
</tr>
<tr>
<td>Website</td>

<td><a href="#">Ahmmm!</a></td>

105
7. Delete_inbox.php

<?php
include_once('[Link]');

if (isset($_POST['delete']) && isset($_POST['ch'])) {


$mailIds = $_POST['ch'];

$placeholders = implode(',', array_fill(0, count($mailIds), '?'));

$sql = "DELETE FROM usermail WHERE mail_id IN ($placeholders)";

$stmt = $conn->prepare($sql);

foreach ($mailIds as $key => $value) {


$stmt->bind_param('i', $value);
}

if ($stmt->execute()) {

$stmt->close();

$conn->close();

header('Location: [Link]');
exit();
} else {
echo "Error deleting messages: " . $stmt->error;
}
} else {
echo "No messages selected for deletion.";
}

// Close the database connection


$conn->close();
?>

106
8. Delete_msg.php
<?php
session_start();
$id = $_SESSION['sid'];
include_once('[Link]');

if (isset($_POST['delete'])) {
foreach ($_POST['ch'] as $v) {
$sql = "SELECT * FROM usermail WHERE rec_id=? AND mail_id=?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("ss", $id, $v);
$stmt->execute();
$result = $stmt->get_result();

while ($dd = $result->fetch_assoc()) {


$rec = $dd['rec_id'];
$sen = $dd['sen_id'];
$sub = $dd['sub'];
$msg = $dd['msg'];
$att = $dd['attachment'];

// Store into trash table


$insert_sql = "INSERT INTO trash (rec_id, sen_id, sub, msg, attachment, date) VALUES
(?, ?, ?, ?, ?, NOW())";
$insert_stmt = $conn->prepare($insert_sql);
$insert_stmt->bind_param("sssss", $rec, $sen, $sub, $msg, $att);
$insert_stmt->execute();

// Delete from inbox


$delete_sql = "DELETE FROM usermail WHERE rec_id=? AND mail_id=?";
$delete_stmt = $conn->prepare($delete_sql);
$delete_stmt->bind_param("ss", $id, $v);
$delete_stmt->execute();
}
}
echo "<script>alert('Message(s)
deleted');[Link]='[Link]?chk=inbox'</script>";
}
?>

107
9. Delete_sent.php

<?php
include_once('[Link]');

if (isset($_POST['delete']) && isset($_POST['ch'])) {


$mailIds = $_POST['ch']; // Array of selected mail IDs to delete

// Prepare a placeholder for each mail ID


$placeholders = implode(',', array_fill(0, count($mailIds), '?'));

// SQL statement to delete messages with the selected IDs


$sql = "DELETE FROM usermail WHERE mail_id IN ($placeholders)";

// Prepare the statement


$stmt = $conn->prepare($sql);

// Bind parameters
foreach ($mailIds as $key => $value) {
$stmt->bind_param('i', $value); // Assuming mail_id is an integer
}

// Execute the statement


if ($stmt->execute()) {
// Close the statement
$stmt->close();

// Close the database connection


$conn->close();

// Redirect back to the home page


header('Location: [Link]');
exit(); // Make sure to exit after redirection
} else {
echo "Error deleting messages: " . $stmt->error;
}
} else {
echo "No messages selected for deletion.";
}

// Close the database connection


$conn->close();
?>

108
10. [Link]

<?php
// Include database connection
include_once('[Link]');

// Check if session 'sid' is set


if (!isset($_SESSION['sid'])) {
// Redirect to login page if not logged in
header('Location: [Link]');
exit();
}

$id = $_SESSION['sid'];

$sql = "SELECT * FROM draft WHERE user_id=?";


$stmt = $conn->prepare($sql);
$stmt->bind_param("s", $id);

// Execute the query and check for errors


if (!$stmt->execute()) {
// Query execution failed, print error message
echo "Error: " . $stmt->error;
} else {
// Query executed successfully
$result = $stmt->get_result();
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Drafts</title>
<link rel="stylesheet" href="path/to/[Link]">
<style>
.drafts-table {
margin-left: auto;
margin-right: auto;
border-collapse: collapse;
width: 80%;
}

.drafts-table th, .drafts-table td {


border: 1px solid #ddd;
padding: 8px;

109
text-align: left;
}

.drafts-table th {
background-color: #f2f2f2;
}

.drafts-table tr:nth-child(even) {
background-color: #f2f2f2;
}

.drafts-table tr:hover {
background-color: #ddd;
}

.attachment-link {
color: blue;
text-decoration: underline;
}
</style>
</head>
<body>

<div class="container mt-4">


<h2 class="mb-3">Drafts</h2>
<table class="drafts-table">
<thead>
<tr>
<th>Subject</th>
<th>Attachment</th>
<th>Message</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
while ($row = $result->fetch_assoc()) {
echo "<tr>";
echo "<td>" . htmlspecialchars($row['sub']) . "</td>";
echo "<td>";
// Check if attachment exists
if (!empty($row['attach'])) {
// Display attachment as a link
echo "<a href='" . htmlspecialchars($row['attach']) . "' class='attachment-link'>" .
htmlspecialchars($row['attach']) . "</a>";
} else {
// No attachment

110
echo "No attachment";
}
echo "</td>";
echo "<td>" . htmlspecialchars($row['msg']) . "</td>";
echo "<td>" . htmlspecialchars($row['date']) . "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>

</body>
</html>

<?php
}

// Close statement and connection


$stmt->close();
$conn->close();
?>

111
11. [Link]

<?php
error_reporting(1);
session_start();

// Check if the session variable is set


if (!isset($_SESSION['sid'])) {
// Redirect the user to the login page if not logged in
header('Location: [Link]');
exit();
}

$sid = $_SESSION['sid'];
include_once('[Link]');

// Prepare and execute the query using MySQLi


$query = "SELECT * FROM userinfo WHERE user_name=?";
$stmt = $conn->prepare($query);
$stmt->bind_param("s", $sid);
$stmt->execute();
$result = $stmt->get_result();

// Check if the query was successful


if ($result && $result->num_rows > 0) {
// Fetch the user row
$row = $result->fetch_assoc();
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Profile</title>
<style>
table {
width: 50%;
margin: 20px auto;
border-collapse: collapse;
border: 1px solid #ccc;
}

th, td {
padding: 10px;

112
border: 1px solid #ccc;
text-align: left;
}

th {
background-color: #f2f2f2;
}

img {
max-width: 80px;
max-height: 80px;
}
</style>
</head>
<body>
<h2 align="center">Your Profile Information</h2>
<table>
<tr>
<th>Your userId :</th>
<td><?php echo $row['user_id']; ?></td>
</tr>
<tr>
<th>Your username :</th>
<td><?php echo $row['user_name']; ?></td>
</tr>
<tr>
<th>Your Mobile :</th>
<td><input type='text' name='mobile' value='<?php echo $row['mobile']; ?>' /></td>
</tr>
<tr>
<th>Email :</th>
<td><input type='text' name='email' value='<?php echo $row['email']; ?>' /></td>
</tr>
<tr>
<th>Your gender is :</th>
<td><?php echo $row['gender']; ?></td>
</tr>
<tr>
<th>Your hobbies are :</th>
<td><?php echo $row['hobbies']; ?></td>
</tr>
<tr>
<th>Your DOB is :</th>
<td><?php echo $row['dob']; ?></td>
</tr>
<tr>
<th>Your Pics :</th>

113
<td><img alt='image not upload' src='userImages/<?php echo $row['user_id']; ?>/<?php
echo $row['file']; ?>' /></td>
</tr>
</table>
</body>
</html>

<?php
} else {
// Handle the case where the user data could not be retrieved
echo "Error: Failed to fetch user data.";
}

// Close the statement and the connection


$stmt->close();
$conn->close();
?>

114
12. [Link]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Compose Email</title>
<link href="[Link]
rel="stylesheet" integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">

<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
margin: 0;
padding: 0;
}

.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
text-align: center;
margin-bottom: 20px;
}

form {
margin-top: 20px;
}

label {
font-weight: bold;
}

input[type="text"],

115
textarea {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 4px;
resize: none;
}

button[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
display: block;
margin: 20px auto;
}

button[type="submit"]:hover {
background-color: #45a049;
}
.h3{color:black;}
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: black; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.disp{color:black}
</style>
</head>
<body>
<header class="bg-primary text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">yumail</h1>
<nav class="header-nav">
<a href="[Link]"><img src='./images/[Link]'>Home</a>
<a href="[Link]?chk=about">About Us</a>
<a href="[Link]?chk=contact">Contact Us</a>
</nav>
</div>

116
</header>
<div class="container">
<h1>Compose Email</h1>
<form action="[Link]" method="post">
<label for="email">To:</label>
<input type="text" id="email" name="email" placeholder="Enter recipient's email"><br>
<label for="subject">Subject:</label>
<input type="text" id="subject" name="subject" placeholder="Enter subject"><br>
<label for="message">Message:</label>
<textarea id="message" name="message" rows="6" placeholder="Enter your
message"></textarea><br>
<button type="submit" name="send">Send</button>
</form>
</div>
</body>
</html>

117
13. [Link]

<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'phpmailer/src/[Link]';
require 'phpmailer/src/[Link]';
require 'phpmailer/src/[Link]';

if (isset($_POST["send"])) {
$mail = new PHPMailer(true);

// Server settings
$mail->isSMTP();
$mail->Host = '[Link]'; // Corrected to '[Link]'
$mail->SMTPAuth = true;
$mail->Username = '[Link]@[Link]';
$mail->Password = 'ufpuaezwtyelzrlp';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // Use the PHPMailer constant
for SMTPS encryption
$mail->Port = 465;

// Recipients
$mail->setFrom('[Link]@[Link]');
$mail->addAddress($_POST["email"]);

// Content
$mail->isHTML(true);
$mail->Subject = $_POST["subject"];
$mail->Body = $_POST["message"];

$mail->send();

echo "
<script>
alert('send Successfully');
[Link] = '[Link]';
</script>
";
}
?>

118
14. [Link]

<?php
session_start();

// Check if user is logged in, if not, redirect to login page


if (!isset($_SESSION['sid'])) {
header('Location: [Link]');
exit;
}

// Include necessary files and establish database connection


include_once('[Link]');
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Mail Server</title>

<link href="[Link]
rel="stylesheet"
integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">

<style>
/* Custom Styles */
.jumbotron {
background-color: #4AD295;
color: #fff;
padding: 20px;
margin-bottom: 20px;
}

nav ul {
list-style: none;
padding: 0;
margin: 0;
}

nav ul li {
display: inline-block;
margin-right: 10px;
}

119
nav ul li:last-child {
margin-right: 0;
}
</style>
</head>
<body>

<div class="container py-4">


<div class="jumbotron">
<h1 class="display-4">Welcome!!! -: <?php echo $_SESSION['sid']?></h1>
</div>

<nav>
<ul class="list-inline">
<li class="list-inline-item"><a href="[Link]?chk=compose">Compose</a></li>
<li class="list-inline-item"><a href="[Link]?chk=inbox">Inbox</a></li>
<li class="list-inline-item"><a href="[Link]?chk=sent">Sent</a></li>
<li class="list-inline-item"><a href="[Link]?chk=draft">Drafts</a></li>
<li class="list-inline-item"><a href="[Link]?chk=gmail">Gmail</a></li>
<li class="list-inline-item"><a href="[Link]?chk=chngPass">Change
Password</a></li>
<li class="list-inline-item"><a href="[Link]?chk=updnews">Latest
Updates</a></li>
<li class="list-inline-item"><a href="[Link]?chk=vprofile">Edit
Profile</a></li>
<li class="list-inline-item"><a href="[Link]?chk=logout">Logout</a></li>
</ul>
</nav>

<div class="content">
<?php
// Check which section to display based on the 'chk' parameter in the URL
$chk = $_REQUEST['chk'] ?? '';

switch ($chk) {
case 'compose':
include_once('[Link]');
break;
case 'inbox':
include_once('[Link]');
break;
case 'sent':
include_once('[Link]');
break;
case 'trash':

120
include_once('[Link]');
break;
case 'draft':
include_once('[Link]');
break;
case 'chngPass':
include_once('[Link]');
break;
case 'vprofile':
include_once('[Link]');
break;
case 'updnews':
include_once('[Link]');
break;
case 'gmail':
include_once('[Link]');
break;
case 'logout':
include_once('[Link]');
break;
default:
break;
}
?>
</div>
</div>

<footer class="bg-dark text-white text-center py-3">


<!-- Your footer content goes here -->
<p>© 2024 My Mail Server</p>
</footer>

<script
src="/docs/5.3/dist/js/[Link]"
integrity="sha384-
YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>

</body>

121
15. [Link]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Update Latest News</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
input[type="text"],
textarea,
input[type="file"] {
width: calc(100% - 20px);
height: 35px;
margin-bottom: 10px;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type="submit"],
input[type="reset"] {
width: auto;
padding: 10px 20px;
border: none;
border-radius: 4px;
background-color: #007bff;
color: #fff;
cursor: pointer;
}
input[type="submit"]:hover,

122
input[type="reset"]:hover {
background-color: #0056b3;
}
.error-message {
color: red;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<form method="post" enctype="multipart/form-data">
<table width="100%" border="0">
<tr>
<th scope="row">Title</th>
<td><input type="text" name="title" required/></td>
</tr>
<tr>
<th scope="row">Contents</th>
<td><textarea rows="10" name="cont" required></textarea></td>
</tr>
<tr>
<th scope="row">Upload your file</th>
<td><input type="file" name="file" id="file"/></td>
</tr>
<tr>
<td colspan="2">
<input type="reset" value="RESET"/>
<input type="submit" name="upd" value="UPDATE"/>
</td>
</tr>
<tr>
<td colspan="2" class="error-message"><?php if(isset($err)) { echo $err; } ?></td>
</tr>
</table>
</form>
</div>
</body>
</html>

123
16. [Link]

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Latest Update</title>

<style>
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.update-info {
margin-bottom: 20px;
}
.update-info strong {
font-weight: bold;
}
.update-info img {
display: block;
max-width: 100%;
height: auto;
margin-top: 10px;
border-radius: 4px;
}
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: black; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }

124
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.disp {color:black}
</style>
</head>
<body>

<header class="bg-primary text-white py-3">


<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">My Mail Server</h1>
<nav class="header-nav">
<a href="[Link]?chk=about">ABOUT US</a>
<a href="[Link]?chk=5"></a>
<a href="[Link]?chk=contact">CONTACT US</a>
</nav>
</div>
</header>

<div class="container">
<?php
include_once('[Link]');

$ret = mysqli_query($conn, "SELECT * FROM latestupd ORDER BY upd_id DESC LIMIT


1");
$row = mysqli_fetch_object($ret);

echo "<div class='update-info'>";


echo "<strong>Title :</strong> " . $row->title . "<br/><br/>";
echo "<strong>Contents :</strong> " . $row->content . "<br/><br/>";
echo "<strong>Publish Date :</strong> " . $row->date . "<br/><br/>";
echo "<strong>Picture:</strong><img src='latestUpdates/" . $row->image . "' alt='Latest
Update Image'>";
echo "</div>";
?>
</div>

<script
src="/docs/5.3/dist/js/[Link]"
integrity="sha384-
YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</body>

125
17. [Link]

<?php
session_start(); // Start the session at the beginning of the script
error_reporting(1);
include_once('[Link]');

if(isset($_POST['signIn'])) {
if($_POST['id'] == "" || $_POST['pwd'] == "") {
$err = "Fill your ID and password first";
} else {

$username = $_POST['id'];
if (strpos($username, '@[Link]') === false) {
$err = "Username must include @[Link]";
} else {

$username = str_replace('@[Link]', '', $username);

$query = "SELECT * FROM userinfo WHERE user_name='$username'";


$result = mysqli_query($conn, $query);

if(!$result || mysqli_num_rows($result) == 0) {
$err = "Invalid ID or password";
} else {
$row = mysqli_fetch_assoc($result);
$fid = $row['user_name'];
$fpass = $row['password'];

if($fid == $username && $fpass == $_POST['pwd']) {


$_SESSION['sid'] = $username;
header('Location: [Link]');
exit();
} else {
$err = "Invalid ID or password";
}
}
}
}
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

126
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - My Mail Server</title>
<link href="[Link]
rel="stylesheet" integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
<style>
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: #fff; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.disp{color:black}
</style>
</head>

<body>
<header class="bg-primary text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">My Mail Server</h1>
<nav class="header-nav">
<a href="[Link]"><img src='./images/[Link]'>Home</a>
<a href="[Link]?chk=about">About Us</a>
<a href="[Link]?chk=contact">Contact Us</a>
</nav>
</div>
</header>

<main class="container py-4">


<div class="jumbotron bg-body-tertiary rounded-3 position-relative">
<div class="container-fluid py-5 text-center text-white position-relative">
<h1 class="display-5 fw-bold disp">Login to <span class="color-blue">My Mail
Server</span></h1>
<p class="col-md-8 mx-auto fs-4 disp">Sign in to access your emails and enjoy our secure
and reliable service.</p>
</div>
</div>

<div class="container py-4">


<div class="bg-light p-4 rounded-3">
<form method="post">
<div class="mb-3">
<label for="email" class="form-label">Enter your Email</label>

127
<input type="text" class="form-control" id="email" name="id"
placeholder="username@[Link]" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Enter your password</label>
<input type="password" class="form-control" id="password" name="pwd" required>
</div>
<button type="submit" class="btn btn-primary" name="signIn">Sign In</button>
<a href="[Link]?chk=registration" class="ms-3">Sign Up</a>
</form>
<div class="mt-3">
<font color="#FF0000"><?php echo @$err; ?></font>
</div>
</div>
</div>
</main>

<footer class="bg-light text-center py-3">


<p>© 2024 My Mail Server</p>
<div>
<a href="#" class="text-body-secondary">Privacy Policy</a> |
<a href="#" class="text-body-secondary">Terms of Service</a>
</div>
</footer>

<script src="/docs/5.3/dist/js/[Link]" integrity="sha384-


YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</body>
</html>

128
18. [Link]

<?php
include_once('[Link]');
session_start(); // Ensure session is started
error_reporting(E_ALL); // Enable full error reporting for debugging

$y = $_POST['y'] ?? '';
$m = $_POST['m'] ?? '';
$d = $_POST['d'] ?? '';
$dob = $y . "-" . $m . "-" . $d;
$ch = isset($_POST['ch']) ? $_POST['ch'] : array();
$imgpath = $_FILES['file']['name'] ?? '';
$un = $_POST['un'] ?? '';
$hobbies = implode(',', $ch);

if (isset($_POST['reg'])) {
if ($_POST['un'] == "" || $_POST['pwd'] == "") {
$err = "Please fill your username and password.";
} else {
$query = "SELECT * FROM userinfo WHERE user_name='{$_POST['un']}'";
$result = mysqli_query($conn, $query);
$rows = mysqli_num_rows($result);
if ($rows == 1) {
$err = "User already exists, please choose another username.";
} else {
$insert_query = "INSERT INTO userinfo VALUES ('', '{$_POST['un']}',
'{$_POST['pwd']}', '{$_POST['mob']}', '{$_POST['eid']}', '{$_POST['gen']}', '$hobbies', '$dob',
'$imgpath')";
if (mysqli_query($conn, $insert_query)) {
mkdir("userImages/$un");
move_uploaded_file($_FILES["file"]["tmp_name"], "userImages/$un/" .
$_FILES["file"]["name"]);
$_SESSION['sname'] = $_POST['un'];
echo "<script>[Link]='[Link]?chk=5'</script>";
} else {
$err = "Error in registration. Please try again.";
}
}
}
}
?>

<!DOCTYPE html>
<html lang="en">

129
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Form</title>
<link href="[Link]
rel="stylesheet" integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
<style>
.error-message { color: red; }
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: #fff; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.disp{color:black}
</style>
</head>
<body>
<header class="bg-primary text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">My Mail Server</h1>
<nav class="header-nav">
<a href="[Link]"><img src='./images/[Link]'>Home</a>
<a href="[Link]?chk=about">About Us</a>
<a href="[Link]?chk=contact">Contact Us</a>
</nav>
</div>
</header>

<div class="container">
<div class="row justify-content-center mt-5">
<div class="col-md-6">
<h2 class="text-center mb-4">User Registration</h2>
<form method="post" enctype="multipart/form-data">
<div class="mb-3">
<label for="username" class="form-label">Enter Your User Name</label>
<input type="text" class="form-control" id="username" name="un" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Enter Your Password</label>
<input type="password" class="form-control" id="password" name="pwd" required>
</div>

130
<div class="mb-3">
<label for="gender" class="form-label">Select Your Gender</label>
<div>
<input type="radio" id="male" name="gen" value="m">
<label for="male">Male</label>
</div>
<div>
<input type="radio" id="female" name="gen" value="f">
<label for="female">Female</label>
</div>
</div>

<div class="mb-3">
<input type="checkbox" id="terms" name="checklist" required>
<label for="terms">I accept terms & conditions</label>
</div>
<div class="mb-3">
<input type="submit" class="btn btn-primary" name="reg" value="Register">
<input type="reset" class="btn btn-secondary" value="Reset">
</div>
</form>
<?php if(isset($err)) { echo "<p class='error-message'>$err</p>"; } ?>
</div>
</div>
</div>

<script src="/docs/5.3/dist/js/[Link]" integrity="sha384-YvpcrYf0tY3lHB60NN


</body>
</html>

131
19. [Link]

<?php
include_once('[Link]');

if (session_status() === PHP_SESSION_NONE) {


session_start();
}

if (!isset($_SESSION['sid'])) {
header('Location: [Link]');
exit();
}

$id = $_SESSION['sid'];

$sql = "SELECT * FROM usermail WHERE sen_id = ?";


$stmt = $conn->prepare($sql);
$stmt->bind_param("s", $id);

if (!$stmt->execute()) {
echo "Error executing SQL query: " . $stmt->error;
exit();
}

$result = $stmt->get_result();
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sent Messages</title>
<link rel="stylesheet" href="path/to/[Link]">
<style>
.sent-table {
margin-left: auto;
margin-right: auto;
border-collapse: collapse;
width: 80%;
}

.sent-table th, .sent-table td {


border: 1px solid #ddd;
padding: 8px;
text-align: left;

132
}

.sent-table th {
background-color: #f2f2f2;
}

.sent-table tr:nth-child(even) {
background-color: #f2f2f2;
}

.sent-table tr:hover {
background-color: #ddd;
}

.delete-btn {
padding: 8px 16px;
background-color: #f44336;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}

.delete-btn:hover {
background-color: #d32f2f;
}
</style>
</head>
<body>

<div class="container mt-4">


<h2 class="mb-3">Sent Messages</h2>
<form method='POST' action='delete_sent.php'>
<table class="sent-table">
<thead>
<tr>
<th>Check</th>
<th>Receiver</th>
<th>Subject</th>
<th>Message</th>
<th>Attachment</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
while($row = $result->fetch_assoc()) {

133
echo "<tr>";
echo "<td><input type='checkbox' name='ch[]' value='" . $row['mail_id'] . "'/></td>";
echo "<td>" . htmlspecialchars($row['rec_id']) . "</td>";
echo "<td>" . htmlspecialchars($row['sub']) . "</td>";
echo "<td>" . htmlspecialchars($row['msg']) . "</td>";
echo "<td>" . htmlspecialchars($row['attachment']) . "</td>";
echo "<td>" . htmlspecialchars($row['recDT']) . "</td>"; // Corrected column name
for date
echo "</tr>";
}
?>
</tbody>
</table>
<input type='submit' value='Delete' name='delete' class="delete-btn mt-3"/>
</form>
</div>

</body>
</html>

<?php
$stmt->close();
$conn->close();
?>

134
20. [Link]

<?php
session_start();
error_reporting(1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Mail Server</title>
<link href="[Link]
rel="stylesheet"
integrity="sha384-
QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous">
<style>
.header-nav a:hover { color: #00FF66; }
.header-nav a { font-size: 18px; margin: 0 10px; color: #fff; }
.header-nav a img { vertical-align: middle; width: 30px; height: 30px; margin-right: 5px; }
.jumbotron { position: relative; }
.jumbotron video { object-fit: cover; position: absolute; top: 0; left: 0; width: 100%; height:
100%; z-index: -1; }
.content { padding: 20px; }
footer { text-align: center; padding: 10px 0; }
.marquee { padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
</style>

</head>

<body>
<header class="bg-primary text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">My Mail Server</h1>
<nav class="header-nav">
<a href="[Link]"><img src='./images/[Link]'>Home</a>
<a href="[Link]?chk=about">About Us</a>
<a href="[Link]?chk=login">Login</a>
<a href="[Link]?chk=registraion">New User?</a>
<a href="[Link]?chk=contact">Contact Us</a>
</nav>
</div>
</header>

<main class="container py-4">

135
<div class="container py-4">
<div class="bg-body-tertiary p-4 rounded-3">
<h3>Welcome
<?php
if (isset($_SESSION['sname'])) {
echo $_SESSION['sname'];
} else {
echo "Guest";
}
?>
</h3>
<br>
<p>Your account has been created. To access your account, <a
href="[Link]?chk=login">Click here</a>.</p>
<br>
<h3>Email: <?php echo $_SESSION['sname'] ?? ''; ?>@[Link]</h3>
<br><br>
<p>**Remember your Email as it is the key to access the mail server**</p>
</div>
</div>
</main>

<aside class="container py-4">


<div class="marquee">
<marquee direction="up" behavior="alternate" onmouseover="stop()"
onmouseout="start()">
<a href="[Link]?chk=7">Latest Updates</a>
</marquee>
</div>
</aside>

<footer class="bg-light text-center py-3">


<p>© 2024 My Mail Server</p>
<div>
<a href="#" class="text-body-secondary">Privacy Policy</a> |
<a href="#" class="text-body-secondary">Terms of Service</a>
</div>
</footer>

<script
src="/docs/5.3/dist/js/[Link]"
integrity="sha384-
YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"

136
crossorigin="anonymous"></script>

</body>
</html>

21. [Link]

<?php
session_start();
session_unset();
session_destroy();
header('Location: [Link]');
exit();
?>

137
138
139

Common questions

Powered by AI

The mailing system incorporates user experience design principles such as an intuitive interface and clear navigation to cater to users with varying technical expertise. The interface is designed to be easy to learn and use, promoting accessibility and user adoption. This user-centered approach ensures a smooth and engaging experience, making the system more appealing to a wider audience .

The proposed mailing system is designed with scalability in mind by utilizing a codebase structured to allow future feature integrations as communication needs evolve. The use of PHP, a widely supported server-side scripting language, provides a solid foundation for building scalable web applications. Additionally, the open-source development approach accelerates development and supports ongoing customization and expansion as user requirements change .

The project ensures data security and user privacy by adhering to industry standards such as SMTP Authentication and encryption protocols like Transport Layer Security (TLS) to safeguard email transmission. Additionally, the system features secure logins and encrypted data storage to protect sensitive information. Regular security audits and updates further reinforce the commitment to maintaining high standards of user trust and data protection .

The proposed system offers enhanced user customization options not available in many free email services, such as customizable interfaces and functionalities. It also addresses limitations faced by existing systems, like restricted storage and advanced features, by providing a scalable solution tailored for specific business needs. Security is another differentiator, with the system catering to users requiring superior security measures for sensitive communication .

The proposed mailing system addresses the needs of businesses requiring high levels of security by implementing secure communication protocols, such as SMTP Authentication and TLS encryption, ensuring the confidentiality and integrity of sensitive information. It also provides secure logins and encrypted data storage to safeguard against unauthorized access. These features make the system particularly attractive to businesses that prioritize security in their communication processes .

Future enhancements for the mailing system include features like message scheduling, spam filtering, content moderation, and integration with third-party services to increase functionality and user engagement. Other potential enhancements are email tracking, analytics, custom email templates, and mobile app accessibility. These enhancements aim to meet evolving communication needs and improve workflow efficiency, thereby increasing overall user satisfaction .

User support and documentation are critical to the successful deployment of the mailing system because they facilitate the adoption process, aiding users in understanding and efficiently utilizing the system's features. The system provides user guides, help documentation, and basic support systems, ensuring that users can resolve common issues and receive assistance when necessary, thus enhancing user satisfaction and engagement .

Using PHP as the backend language offers several advantages, including its widespread use and strong community support, which enhance development efficiency. PHP's open-source nature allows developers to leverage existing libraries and frameworks, accelerating development and reducing costs. Furthermore, PHP enables scalable and customizable solutions, accommodating future feature integrations and evolving user needs .

Third-party integration enhances the functionalities of the mailing system by allowing seamless data exchange and interoperability with other applications, such as calendars or CRM systems. This integration supports a holistic communication experience, increasing system utility and user productivity. Furthermore, it allows for the integration of additional tools, expanding the system's capabilities and providing more value to users .

The mailing system facilitates efficient email composition and management through features like message composition with rich text formatting, attachment support, and recipient selection from an address book. It also includes separate folders for sent and draft messages, allowing users to manage their emails effectively. Additionally, advanced search capabilities enable users to easily locate specific emails, enhancing organizational efficiency .

You might also like