0% found this document useful (0 votes)
23 views38 pages

Email FTP

The document provides an overview of email services, detailing how email allows users to send and receive messages globally through mail servers using protocols like SMTP. It describes the components of an email, types of email services (client-based and web-based), and protocols for transferring emails (POP3 and IMAP). Additionally, it covers FTP and HTTP protocols, their functionalities, and how they facilitate file transfers and web communication.

Uploaded by

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

Email FTP

The document provides an overview of email services, detailing how email allows users to send and receive messages globally through mail servers using protocols like SMTP. It describes the components of an email, types of email services (client-based and web-based), and protocols for transferring emails (POP3 and IMAP). Additionally, it covers FTP and HTTP protocols, their functionalities, and how they facilitate file transfers and web communication.

Uploaded by

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

Email

Email
E-mail is one of the services provided by the Internet to its
users.
E-mail enables an Internet user to send and receive electronic
messages in any part of the world.
A mail server is a program that uses protocols to serve as an
electronic post office for email.
It transfers electronic mail messages from one computer to
another computer in the network. Most e-mail service uses
Simple Mail Transfer Protocol (SMTP) to transfer e-mail
message between senders and receivers.
Email
When sending an e-mail, a sender specifies the e-mail address of the
receiver.
The e-mail service delivers an already sent mail into its receiver’s mailbox.
The receiver extracts e-mail from the mailbox and reads it at own
convenient time. After reading message, the receiver can save it, delete it,
pass it to someone else, or respond by sending another message back.
Messages in e-mail service can contain text, image, audio, and video data.
With e-mail service, Internet has proved to be rapid and productive
communication tool for individuals and businesses.
Email
An e-mail message is made up of several parts:
1. Recipient’s Address
2. Cc and Bcc
3. Subject Line
4. Body
5. Attachments
6. Signature
7. Date and Time Stamp: The date and time an email was sent is
usually included automatically somewhere in the message.
Recipient’s Address:
◦ The first thing you need to know when composing an email is the recipient's
address.
◦ This is generally entered before you compose the body of the email.
◦ An example of an email address is: [email protected].
Cc and Bcc:
◦ Another option when sending a message to multiple recipients is to use the CC
(carbon copy) and BCC (blind carbon copy) fields.
◦ When using the Cc feature, all recipients can see the email addresses of everyone
the message was sent to.
◦ If you want your communication to be more private, choose the Bcc and the
identities of the other recipients will not be shown.
Subject Line:
◦ The subject line is the first part of your email that the recipient will see.
◦ When entering the subject line be sure to include important information such as
Body:
◦ The actual message that you want to send.
◦ Your message can be anything from a professional memo to a note to
friend or family member.
Attachments:
◦ If you have files that you want to share with your recipient's you can
include them as attachments to the email.
Signature:
◦ Some email systems allow you to enter a signature that will appear
automatically at the bottom of every message you send.
◦ This feature is optional and can be turned off and on as needed.
Date and Time Stamp:
◦ The date and time an email was sent is included automatically in the
Types of E-mail (Web vs. Client)
E-mail is a basic service that allows you to send messages from one
user to another. Basically there are two types of email services.
Client-based Email:
◦ Client-Based Email means you need a program on your computer and
configures properly in order to read the mail.
◦ Examples of email clients are Microsoft Outlook, Mozilla Thunderbird, etc.
◦ No matter which client program you use, some basic information you
need to gather before you can configure your email program. You can get
the information needed from the ISP (Internet Service Provider). The
information needed are:
Client-based Email:
Username: This is usually just the first part of your email address.
Password: Your password corresponding with your Username.
Email Address: A valid email address looks like this:
[email protected].
POP3 Server Address: This is the address we need to configure to get
your incoming mail. It typically looks like this: mail.your-isp.net
SMTP Server Address: This is the address we need to configure to get
your outgoing mail. It typically looks like this: smtp.your-isp.net or
mail.your-isp.net
If you configure the client program properly, you can send and receive
email messages through your client program from your computer.
Web-based Email
To utilize the web-based email services, first you need to register to get a
free account.
To start the process, you have to log-in with a USERNAME/LOGIN ID and
PASSWORD.
Then you have full control to send, receive, forward, reply and delete your
email files. Some of the well-known free web-based email services are:
◦ Yahoo.com
◦ Gmail.com
◦ MSN.com
The advantage of web-based email services is that you can check your
mail from any computer that is connected to the internet.
All of your email files are stored on the web-based server.
A Typical Mail Environment

Internet
Interactive Mail
Access Protocol
SMTP
Mail Server
Mail Server IMAP
IMAP Mail
store Client
POP SMTP
Store

POP
SMTP

Mail
Client
SMTP

Mail Mail gateway Mail


reader reader

Mail Mail Mail


daemon daemon daemon

SMTP/TCP SMTP/TCP
Simple Mail Transfer Protocol (SMTP)
Internet standard for electronic mail (e-mail) transmission.
First defined by RFC 821 in 1982, it was last updated in 2008 with
the Extended SMTP additions by RFC 5321 - which is the protocol in
widespread use today.
SMTP by default uses TCP port 25.
The protocol for mail submission is the same, but uses port 587. SMTP
connections secured by SSL, known as SMTPS, default to port 465.
While electronic mail servers and other mail transfer agents use SMTP
to send and receive mail messages, user-level client mail applications
typically use SMTP only for sending messages to a mail server
for relaying. For receiving messages, client applications usually use
either the POP3 or the IMAP.
Post Office Protocol
Protocol to transfer e-mail messages from mailbox to local
computer.
User invokes a POP3 client, which creates a TCP connection to a
POP3 server on the mailbox computer.
Computer with permanent mailbox must run 2 servers-
◦SMTP( Accepts mail sent to user)
◦POP3 (Allows to extract messages from mailbox).
POP3
The client POP3 software is installed on the recipient machine,
and the server POP3 software installed on mail server.
◦ The client (user agent) opens a connection with the server on TCP port
number 110.
◦ Sends user name and password.
◦ Can access the mails, one by one.
POP3 (Cont.)
Two modes:
◦ Delete mode – mails deleted as they are read.
◦ Keep mode – mails remain in the mailbox.
POP3 has commands for:
◦ Log in
◦ Log out
◦ Fetch messages
◦ Delete messages
IMAP4
Internet Message Access Protocol is an alternative to POP3.
User runs a IMAP4 client that contacts the server to retrieve
messages.
IMAP4 allows user to dynamically create, delete or rename mail
boxes.
FTP
File Transfer Protocol (FTP) is the standard mechanism provided
by TCP/IP for copying a file from one host to another.
FTP uses the services of TCP. It needs two TCP connections.
The well-known port 21 is used for the control connection and
the well-known port 20 for the data connection.
Although transferring files from one system to another seems
simple and straightforward, some problems must be dealt with
first.
What do you need to know?

1. The name of the ftp site (host computer). For example,


ftp.hostname.com
2. The name of the file to be transferred.
File1.pdf
3. The directory path where the file is stored
/Directory1/SubDirectory/
Filezilla
The free FTP solution.
Both a client and a server are available.
FileZilla is open source software distributed free of charge under
the terms of the GNU General Public License
For more info : https://filezilla-project.org/
Lets see how to use Filezilla Client & Transfer files
Viewing Files

Files on your Files on host


computer computer
Navigate to the right path
Drag+Drop to Transfer

Target File

Downloaded
File

Log
Transfer
Status
Figure FTP
Table Access commands
Figure: FTP - Control Connection & Data Connection

TCP/IP Protocol Suite 26


Figure abobe shows an example of using FTP for retrieving a list of
items in a directory.
1. After the control connection to port 21 is created, the FTP server
sends the 220 (service ready) response on the control
connection.
2. The client sends the USER command.
3. The server responds with 331 (user name is OK, password is
required).
4. The client sends the PASS command.
5. The server responds with 230 (user login is OK)
6. The client issues a passive open on an ephemeral port for the
data connection and sends the PORT command (over the control
connection) to give this port number to the server
7. The server does not open the connection at this time, but it
prepares itself for issuing
8. The client sends the LIST message.
9. ow the server responds with 125 and opens the data
connection.
10. The server then sends the list of the files or directories (as a
file) on the data connection. When the whole list (file) is sent,
the server responds with 226 (closing data connection) over the
control connection.
11. The client now has two choices. It can use the QUIT command
to request the closing of the control connection or it can send
another command to start another activity (and eventually
open another data connection). In our example, the client
sends a QUIT command.
12. After receiving the QUIT command, the server responds with
221 (service closing) and then closes the control connection.
HTTP
Short for HyperText Transfer Protocol, the underlying protocol used
by the World Wide Web.
HTTP defines how messages are formatted and transmitted, and what
actions Web servers and browsers should take in response to various
commands.
For example, when you enter a URL in your browser, this actually
sends an HTTP command to the Web server directing it to fetch and
transmit the requested Web page.
Language of the Web
◦ protocol used for communication between web browsers and web servers
TCP port 80 (443 secure)
HTTP - methods
Methods
◦ GET
 retrieve a URL from the server
 simple page request
 run a CGI program
 run a CGI with arguments attached to the URL
◦ POST
 preferred method for forms processing
 run a CGI program
 parameterized data in sysin
 more secure and private
HTTP Request Packets
Sent from client to server
Consists of HTTP header
◦ header is hidden in browser environment
◦ contains:
 content type / mime type
 content length
 user agent - browser issuing request
 content types user agent can handle
and a URL
Response Packets
Sent by server to client browser in response to a Request Packet
Status Header
“HTTP/1.0 sp code”
Codes:
◦ 1xx - reserved for future use
◦ 2xx - successful, understood and accepted
◦ 3xx - further action needed to complete
◦ 4xx - bad syntax in client request
◦ 5xx - server can’t fulfill good request
HTTP Response Headers
Sent by server to client browser
Status Header
◦ Entities
 Content-Encoding:
 Content-Length:
 Content-Type:
 Expires:
 Last-Modified:
 extension-header
Body – content (usually html)
Status Codes
200 OK 401 unauthorized
201 created 403 forbidden
202 accepted 404 not found
204 no content 500 int. server error
301 moved perm. 501 not impl.
302 moved temp 502 bad gateway
304 not modified 503 svc not avail
400 bad request
Statelessness
Because of the Connect, Request, Response, Disconnect
nature of HTTP it is said to be a stateless protocol
◦ i.e. from one web page to the next there is nothing in the protocol that
allows a web program to maintain program “state” (like a desktop
program).
◦ “state” can be maintained by “trickery” if it is needed
Maintaining program “state”
Hidden variables (<input type=hidden>
Sessions
◦ Special header tags interpreted by the server
 Used by ASP, PHP, JSP
 Implemented at the language api level
Internet Client Applications
Email(Mozilla Thunderbird, Microsoft Outlook)
FTP (eg. Filezilla, CuteFTP)
Video Conferencing
Google Talk, Windows Live Messenger, Yahoo Messenger, Skype

You might also like