You are on page 1of 28

Electronic Mail

E-Mail
• Client Software and Mail Hosts
– Client PC has E-Mail client software that
communicates with user’s mail host
– Mail hosts deliver outgoing mail to other mail
hosts

PC with PC with
E-Mail Client Mail Host Mail Host E-Mail Client
SMTP
• Simple Mail Transfer Protocol (SMTP)
– Standard for mail host-mail host exchanges
– E-Mail Client often sends messages to mail host
via SMTP, but not always

SMTP SMTP

PC with
E-Mail Client Mail Host Mail Host
SMTP Operation
• For Each Message, the Sending Process
– Makes a connection
– Gives name of sender (From) and gets OK
– Gives names of receivers individually and
gets OK for each separately
– Asks to send message, gets OK
– Sends message, gets confirmation
– Closes connection
Receiving and Sending E-Mail
• User’s Mail Host Stores Incoming Files in
the User’s Mailbox
– User later retrieves them
– User also sends outgoing mail

Receive Mail

Send Mail
Client PC Mail Host
With User’s Mailbox
File Server Program Access E-
Mail
• Use proprietary ways to send messages, get
messages, and in other ways interact with
the mail host
– Can be used only on LANs
– Cannot be used over the Internet

PC with FSPA
E-Mail Program
LAN
POP Clients
• POP (Post Office Protocol) is the most
popular standard for mail downloading
– Download messages all or selectively
– Send outgoing messages via SMTP
– Works via Internet

SMTP SMTP

POP
PC with
Internet E-Mail Client Mail Host Mail Host
POP Operation
• Several client-mail host interactions needed to
download new mail
– Log into mail host
– Can ask how many new messages there are and how
long they are
– Can download all or download one at a time
– If download one at a time, can decide based on
length
– Can delete messages on host after downloading
– Close the session
IMAP Clients
• IMAP (Internet Message Access Protocol)
– But not as widely supported as POP
– Send outgoing messages via SMTP
– Works via the Internet

SMTP SMTP

IMAP
PC with
Internet E-Mail Client Mail Host Mail Host
IMAP Clients
• IMAP (Internet Message Access Protocol)
– More sophisticated than POP
• Can do more on mail server’s mailbox than
download and delete messages; can fully manage
the mailbox

SMTP SMTP

IMAP
PC with
Internet E-Mail Client Mail Host Mail Host
Browser Clients (Web-Based E-Mail)
• Client is Browser
• Mail Host is a Webserver
– Mail host sends HTML pages to client
– User types messages and retrieval data in
forms, sends back
• All communication is via HTTP
HTTP SMTP

PC with Webserver Mail Host


Browser Mail Host
Telnet Clients
• Some mail hosts support Telnet
• Telnet client on PC emulates a simple
terminal
– No color or graphics
– Monospaced Text
– Sometimes only way to interact with a mail
host
Telnet SMTP

PC with Mail Host Mail Host


Telnet Client Supporting Telnet
Recap on Internet E-Mail
Transmission
• Communication Between Mail Hosts
– SMTP
• Communication From Client to its Mail Host
– SMTP
– Proprietary file server program access on LANs
– HTTP
– Telnet
Recap on Internet E-Mail
Transmission
• Communication to Client from its Mail Host
to deliver messages
– POP or IMAP
– Proprietary file server program access on LANs
– HTTP
– Telnet
Note on Internet E-Mail
Transmission
• Client and Server can Communicate Over
the Internet
– Except for File Server Program Access
– You can access your e-mail from anywhere
– Must have the right client program

Client PC Mail Host


With User Mail Box
Message Structure Standards

• RFC 822
– Text-only message bodies
• MIME
– Multimedia message bodies and headers
– Not widely used for bodies or headers
• HTML Bodies
– Becoming common
– Not well standardized; Limited interoperability
between mail clients
Attachments
• Send a message
– Attach a file (word processing document,
spreadsheet, graphic, etc.)
– E-mail can be a file delivery mechanism
Attachments
• Viruses
– Attachments may contain viruses
• Even messages without attachments may contain
viruses today

– Virus scanning before opening is critical


Attachments
• Problem
– Attached files use all 8 bits of each byte
• Called binary data
– On Internet, can only use the first seven bits
• Called 7-bit ASCII
• In Internet transmission, 7th bit may be truncated
if send binary file

10101010 x1010101

Binary Internet
Attachments
• Internet Encoding
– Files must be Internet encoded before
transmission to travel over the Internet using
only the first 7 bits in each byte
– At the receiving end, files must be Internet
decoded so that applications can read them
Internet Internet Internet
Encoding Transmission Decoding

10101010 x1010101 x1010101 10101010

Binary Internet Internet Binary


Attachments
• Internet Encoding Example (There are
Other Internet Encoding Standards)
– Break file into groups of three data bytes (24
bits)
– Create group of four encoded bytes (32 bits)

Data Bytes 11111111 00000000 11111111

Encoded Bytes
Attachments
• Internet Encoding Example (There are
Other Internet Encoding Standards)
– Put six bits of each data byte in each outgoing
byte
• Leaves two bits free in each outgoing byte
6,2
Data Bytes 11111111 00000000 11111111

Encoded Bytes xx111111 xx11


Attachments
• Internet Encoding Example (There are
Other Internet Encoding Standards)
– Put six bits of each data byte in each outgoing
byte
• Leaves two bits free in each outgoing byte
4,4
Data Bytes 11111111 00000000

Encoded Bytes xx111111 xx110000 xx0000


Attachments
• Internet Encoding Example (There are
Other Internet Encoding Standards)
– Put six bits of each data byte in each outgoing
byte
• Leaves two bits free in each outgoing byte
2,6
Data Bytes 11111111 00000000 11111111

Encoded Bytes xx111111 xx110000 xx000011 xx111111


Attachments
• Internet Encoding Example (There are
Other Internet Encoding Standards)
– Lowest 31 ASCII codes are control codes
– Add 32 (100000) to each outgoing byte so
that it will not become a control code
– 8th bit is still free, as required

Encoded Bytes xx111111 xx110000 xx000011 xx111111

Add 100000

Encoded Bytes x1011111 x1010000 xx100011 x1011111


Attachments
• Internet Encoding Standards
– Communicating mail clients must use the
same Internet encoding standard to encode
and decode
– UUENCODE is common in UNIX
– MIME
• Several versions of MIME exist
• Basic MIME is almost universally supported by
e-mail clients today
– Binhex is commonly used on Macintoshes
Attachments
• E-Mail users should negotiate before
sending an attachment
– Internet encoding standard they will use
– Application file format they will use
• If same application program and version, fine
• If same application program and different
versions, send in format of older version
• If different application programs, send in a format
and version the other can import
E-Mail Standards Recap

• Transmission Standards
– Sending messages (SMTP, etc.)
– Receiving messages (POP, IMAP, etc.)
• Message Structure Standards
– Message header and body (RFC 822, MIME,
HTML)
– Attachments: common Internet encoding
standard
– Attachments: common application file format

You might also like