APPLICATION: GMAIL
JANUARY 2025 SEMESTER
TFB 1093
DATA COMMUNICATION & NETWORK
GROUP ASSIGNMENT
Prepared by:
NO
NAME
1
Nur Adriana Amanina Binti Mohd
Basir
Aina Aireena binti Anuar
Nurul Aishah Elyani binti Azhar
2
3
STUDENT ID
PROGRAMME
22010357
Information Technology
22010366
22010394
Information Technology
Information Technology
2.0 Protocols Used in Gmail
•
SMTP (Simple Mail Transfer Protocol)
This protocol used between mail servers to send email messages. For instance, the sender’s
email client connects to the mail server via SMTP. The mail server forwards the email to the
recipient’s mail server. If encryption is enabled, TLS encrypts the message.
•
IMAP (Internet Mail Access Protocol)
IMAP provides retrieval, deletion, folders of stored messages on server that enables user
access messages stored on server. The recipient’s email client connects to the mail server
using IMAP. The user reads the email via Gmail Web (HTTP/HTTPS) or an email client.
•
HTTP (HyperText transfer Control)
Gmail's web interface runs on HTTP/HTTPS, which allows users to access their emails via a
browser without using an email client like Outlook or Thunderbird. For example, users can
type gmail.google.com on the browser and access Gmail webpage.
2.1 Example
1. SMTP (Simple Mail Transfer Protocol)
•
•
•
•
Alice logs into Gmail Web (HTTPS) or an email client (e.g., Outlook).
She composes an email to Bob (bob@gmail.com) and clicks "Send."
Her email client contacts the Gmail SMTP server (smtp.gmail.com on port 587 with
TLS encryption).
The SMTP server queues and delivers the email to Bob’s Gmail mail server
2. IMAP (Internet Mail Access Protocol)
•
•
•
Bob checks his Gmail inbox on his phone and laptop.
His email clients connect to the Gmail IMAP server (imap.gmail.com on port 993
with SSL encryption).
IMAP syncs the new email across all his devices without downloading it
permanently.
3. HTTP (HyperText transfer Control)
•
•
•
•
•
•
Bob opens mail.google.com in Chrome.
His browser sends an HTTPS request to Gmail’s web server.
Gmail’s server fetches his emails and sends them in JSON/HTML format.
Bob sees Alice’s email in his inbox and reads it.
He clicks "Reply" and types a response.
Gmail’s web app sends the reply via SMTP
3.0 Data structures for message formats
Emails follow a standard format called MIME (Multipurpose Internet Mail Extensions),
which helps structure emails properly. A typical email has three main parts.
3.1 Header
This contains information like who sent the email, who is receiving it, the subject, and the
date it was sent.
The header contains metadata about the email, including details about the sender, recipient,
subject, and date. It also includes technical information used for email routing and
authentication.
Key Elements of the Header:
-
From: The email address of the sender.
To: The recipient’s email address (or multiple recipients).
Cc (Carbon Copy): Additional recipients who receive a copy of the email but are
not the primary recipients.
Bcc (Blind Carbon Copy): Recipients who receive a copy of the email without
other recipients knowing.
Subject: A brief summary of the email’s content.
Date: The timestamp indicating when the email was sent.
Message-ID: A unique identifier for the email, useful for tracking.
MIME-Version: Indicates that the email follows the MIME standard.
Content-Type: Specifies the type of content in the email (e.g., text/plain,
text/html, or multipart/mixed for emails with attachments).
3.2 Body
The main content of the email, which can be plain text or HTML (formatted text, images,
etc.).
The body is the main content of the email. It can be in different formats:
•
•
•
Plain Text: Simple text without any formatting.
HTML (HyperText Markup Language): Allows rich formatting, including different
fonts, colors, images, links, and tables.
Multipart Messages: Emails can include both plain text and HTML versions to
ensure compatibility with different email clients.
3.3 Attachments
Files included with the email, such as documents or images, which are encoded in a special
way (Base64) so they can be sent safely.
Attachments are files included in an email, such as documents, images, or PDFs. Since email
systems were originally designed to send text, attachments are encoded using Base64
encoding, which converts binary files into text format so they can be safely transmitted.
How Attachments Work:
•
•
Encoded using Base64: Converts binary files (like PDFs or images) into text format.
MIME multipart/mixed type: Emails with attachments are structured using the
multipart/mixed MIME type, which allows multiple parts in a single message (body +
attachments).
4.0 Error Handling
4.1 Client-Side Error Handling
•
Continuous Draft Autosave:
o Gmail autosaves your email continuously as you type. This protects your work
if you accidentally close your browser or lose network connectivity.
•
Real-Time Input Validation:
o Email Address Checks: Immediately verifies that email addresses are
correctly formatted.
o Attachment Checks: Warns you if an attachment is too large or not
supported.
•
Content Alerts: Notifies you if required fields like subject or message body are
missing.
Offline Mode and Message Queuing:
o If you lose connectivity, Gmail allows you to keep working. Outgoing emails
are stored in an outbox and automatically sent once your connection is
restored.
User Notifications and Actionable Feedback:
o When an error such as a network timeout or send failure occurs, Gmail
displays clear, concise messages, for example, “Your message failed to send.
Please check your connection.”
•
•
o Provides options like a “Resend” button to easily retry the action.
4.2 Server-Side Error Handling
•
Protocol Error Monitoring:
o Standardized Error Codes: Uses SMTP and IMAP error codes
o e.g., SMTP 550 for invalid recipients, SMTP 421 for temporary issues to
detect and classify errors.
o Error Translation: These codes are interpreted and translated into userfriendly messages that are sent back to the client.
•
Automatic Retry Mechanism:
o For transient errors like brief server unavailability or network congestion,
Gmail’s servers automatically retry sending emails without requiring user
intervention.
•
Redundancy, Load Balancing, and Failover:
o Distributed Architecture: Gmail operates on a distributed server network,
ensuring that if one server fails, others can immediately take over.
o Load Balancing: Traffic is distributed across multiple servers to prevent any
single server from becoming overwhelmed, thus minimizing errors.
•
Centralized Logging and Real-Time Monitoring:
o All errors are logged centrally, allowing engineers to monitor error patterns in
real time.
o Proactive Issue Resolution: Automated alerts help system administrators
quickly address and resolve recurring issues before they impact users.
•
Security and Session Management:
o TLS/SSL Enforcement: All client-server communications are encrypted
using TLS/SSL. If a secure connection can’t be established
o e.g., due to certificate issues, the user is alerted immediately.
o Session Control: Gmail monitors active sessions and token validity,
prompting re-authentication if needed and preventing unauthorized access.
5.0 Security Features
Gmail places a high priority on security to protect users from spam, phishing scams, and
hackers. Among the methods Gmail uses to guarantee security are;
1. TLS Encryption (Transport Layer Security)
-
Gmail encrypts emails in transit using TLS (Transport Layer Security).
This prevents attackers from intercepting and reading your emails while they are
being sent between servers.
If the recipient's email service does not support TLS, Gmail warns the sender.
Example:
-
If you send an email from Gmail to Yahoo, and Yahoo supports TLS, the email is
encrypted.
If Yahoo does not support TLS, Gmail shows a warning saying the email may not
be secure.
2. OAuth2 Authentication (Instead of Passwords)
-
Gmail does not rely on passwords alone. Instead, it uses OAuth2, a secure
authentication method.
Apps that access Gmail (e.g., Microsoft Outlook, Thunderbird) need a secure
token instead of a password.
This prevents hackers from stealing your password through phishing attacks.
Example:
-
When you sign in to Gmail on a new device, you get a Google prompt or
verification code instead of entering your password.
3. Two-Factor Authentication (2FA)
-
Gmail allows users to enable 2-step verification, which requires a second login
step.
Even if someone steals your password, they cannot log in without the second step
(a code, fingerprint, or security key).
Example:
-
You enter your Gmail password, and then Google asks for a one-time code sent to
your phone.
This prevents hackers from accessing your account even if they know your
password.
4. End-to-End Encryption (E2EE) [Upcoming Feature]
-
Google is working on end-to-end encryption, meaning only the sender and
recipient can read the email.
Not even Google can access the email content.
Example:
-
If you send an encrypted email, even Gmail cannot decrypt it only the recipient
can.