You are on page 1of 31

E-Mails

A simple note!
Structure of Email Address

• Username@Domainname
• Domain name: name of the server keeping emails of a user. This could be any free
web-based email service provider ex gmail.com to any private company ex
sharda.ac.in.
• Username: your specific account. Ex: abs@gmail.com , xyz@sharda.ac.in etc.

E-mail Address
Structure of an email
• The header
• The message
• the header fields
• the message body
The header
• a set of lines containing information about the message's
transportation, such as
• the sender's address,
• the recipient's address,
• or timestamps showing when the message was sent by intermediary servers
to the transport agents (MTAs), which act as a mail sorting office.

The header begins with a From line and is changed each time it passes through
an intermediary server. Using headers, you can see the exact path taken by the
email, and how long it took each server to process.
The message
• The header fields, a set of lines describing the message's settings,
such as the sender, the recipient, the date, etc.
• Each one has the following form: Name: Value
• An email includes at least the three following headers:
• From: The sender's email address
• To: The recipient's email address
• Date: The date when the email was sent
• It may contain the following optional fields:
• Received: Various information about the intermediary servers and the date when the
message was processed.
• Reply-To: A reply address.
• Subject: The message's subject
• Message-ID: A unique identification for the message.
Header
Examples
• Hotmail
• Log in to your Hotmail account.
• Select Inbox from the left-side menu.
• Right-click the message you'd like to view headers for and select View
Message Source.
• The full headers will appear in a new window.
• Yahoo! Mail
• Log in to your Yahoo! Mail account.
• Select the message you'd like to view headers for.
• Click the Actions dropdown and select View Full Header.
• The full headers will appear in a new window.
The message
• The message body, containing the message, separated from the
header by a line break.
How Email is sent!
UAs and MTs
Relay MTAs
Mail Gateways
Sending of emails :Steps Involved

• Four computers, namely the sending computer, the sending computer’s


local mail server, the receiving computer’s mail server and the receiving
computer, with the network being the carrier.
• An email sent by an end user is first transferred to its local mail server,
using SMTP.
• The local mail server then transfers the mail to the recipients mail server,
again using SMTP as the carrier protocol.
• The mail is then retrieved from the receiver’s mail server by the receiving
computer through a pull protocol like POP3 etc.
• This is clearly illustrated in the above diagram by a red path (for mails sent
from Alice to Bob) and by a blue path (for mails sent from Bob to Alice)
• User Agents (UAs): At the end computers (sender and receiver), entities known as UAs
help the end user in sending and retrieving emails. Functions of UAs include
• providing GUI or command based interfaces to compose, forward, redirect and receive mails.
• The UAs interact with an MTA client protocol to transfer outgoing mails sent by the user to the
local mail server and also interact with an MAA client protocol to retrieve the user’s incoming mail
from the local mail server.
• Eudora, Outlook Express, elm, pine etc. are examples of UAs.
• Mail Servers : Since the end user computers cannot be online always, dedicated mail
servers do the duty of sending and receiving mails for multiple end users, by remaining
always on.
• Mail servers typically run both the client and the server instances of an MTA protocol like SMTP.
• While the MTA client instance protocol is used to send mails to remote mail servers, the MTA
server instance protocol is used to receive mails from both end computers and from remote mail
servers.
• Apart from this, mail servers run the server instance of a MAA protocol (like POP3), to retrieve
mails from the inbox of users and send it to the respective user’s computer, when requested
through an MAA client instance protocol.
The Entire E-mail System
MIME

Though SMTP supports sending mails only in


ASCII format, it allows extensions in the form
of MIME (Multipurpose Internet Mail
Extensions) for carrying a wide variety of data
formats including binary, images, audio, video
etc.
POP3
• Post Office Protocol 3
• POP3 receives and holds email for an individual until they pick it up.
• Client downloads email from the server into their email program, no
more copies of the email on the server exist. ( POP automatically
deleted them)
• POP3- Client checks email from any computer in the world, provided
they have configured their email program properly to work with the
protocol.
POP3 and SMTP

•Port 110 - this is the default POP3 non-encrypted port


•Port 995 - this is the port you need to use if you want to
connect using POP3 securely
Simple Mail Transfer Protocol, or SMTP.
Without it, your emails would go nowhere.

• Store and forward process.


• Mail Transfer Agent (MTA) is used to communicate to the right
computer and email inbox.
• SMTP spells out and directs how your email moves from your
computer's MTA to an MTA on another computer, and even several
computers.
SMTP at work.
• Server break up different parts of a message into categories the
other server can understand.
• As each message travels towards its destination, it sometimes passes
through a number of computers as well as their individual MTAs.
• As it does, it's briefly stored before it moves on to the next computer
in the path.(Letterbox)
• SMTP sometimes stands for "stop."
SMTP Concept

Based on end-to-end message delivery.

Step1: An SMTP client contacts the destination host's SMTP server on port 25, to deliver the mail.
The client then waits for the server to send a 220 READY FOR MAIL message.
Receipt of the 220 message, the client sends a HELO command.
The server then responds with a "250 Requested mail action okay" message.
• Step2: MAIL command gives the
sender identification + FROM:
field that contains the address
to which errors should be
reported.
• Step3:The sender issues a
series of RCPT commands
(recipients of the mail
message).
• Step4:The receiver will the
acknowledge each RCPT
command by sending 250 OK or
by sending the error message
550 No such user here.
• Step 5: After all RCPT commands
have been acknowledged, the
sender issues a DATA command to
inform the receiver that the sender
is ready to transfer a complete mail
message.
• Step 6: The receiver responds with
message 354 Start mail command
with an ending sequence that the
sender should use to terminate the
message data.
• Step 7: The client now sends the
data line by line, ending with the 5-
character sequence <CRLF>.
• Step8:Receiver acknowledges with
a 250 OK, or an appropriate error
message if anything went wrong.
Remote Login
Local Login
Remote Login
Concept of NVT

You might also like