1 / 14

Email Service

Email Service Outline Mail Reader and Mail Server Mail Message Format Mail Protocols Sample MIME messages Practices References Mail Reader and Mail Server Mail Reader Email program that allows a user t create, edit, store and forward e-mail messages

Download Presentation

Email Service

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Email Service

  2. Outline • Mail Reader and Mail Server • Mail Message Format • Mail Protocols • Sample MIME messages • Practices • References

  3. Mail Reader and Mail Server • Mail Reader • Email program that allows a user t create, edit, store and forward e-mail messages • Mail Reader is also called UA (User Agent) • Such as Outlook Express, Netscape Composer, ping, elm • Mail Server • A program (aka a daemon or a server) that in charge of storing and forwarding e-mail messages • Mail Server is also called MTA (Mail Transfer Agent), function like postman and post-office. • Such as sendmail, qmail, Microsoft Exchange

  4. Mail Message Format (RFC 2822) • A mail message consists of a header followed, optionally, by a body. • Header fields (see example above) contains From: , To: , Subject, Date: ...etc. • Body contains what user wants to say (including nontext-based information, such as html, image, or attached files). Header A blank line Body

  5. Mail Message Format (RFC 2822) • RFC 822 headers • RFC 822 headers added by MIME

  6. Mail Protocols • SMTP (Simple Mail Transfer Protocol) 25 • An internet protocol for sending (transferring) e-mail • Both Mail reader and Mail Server (daemons) speak SMTP to transfer e-mail, the mail server accepts connection on port 25 and copies mail messages into appropriate mailboxes. • POP3 (110), IMAP (143) • POP/IMAP allow mail reader to receive e-mail messages. • POP3 stands for Post Office Protocol version 3 • IMAP stands for Internet Message Access Protocol • Both support offline reading (download to PC) • IMAP allow user to create and manipulate folders and mailboxes and more functionalities.

  7. Mail Protocols • MIME (Multipurpose Internet Mail Extensions) RFC 1341 • MIME add structure to the message header and body and defining encoding rules for non-ASCII messages. With MIME, we can send multimedia mail message, including html mail, image, Rich Text Format document (RTF), and attached files and in different languages (such as Chinese, Japanese, Hebrew). • RFC 822 headers added by MIME

  8. Mail Protocols • The MIME content types and subtypes defined in RFC2045, 2046.

  9. Mail Protocols • The MIME content transfer encoding (tells how the body is wrapped for transmission), currently there are five schemes provided to encode non-ASCII material:

  10. Sample MIME messages Header From: James Bond<example@example.com>To: Indiana Jones Subject: Hello from 007 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="XXXXboundary text" --XXXXboundary text Content-Type: text/plain this is the body text --XXXXboundary text Content-Type: text/plain; Content-Disposition: attachment; filename="test.txt" this is the attachment text --XXXXboundary text-- A blank line 1st body part Body 2nd body part

  11. Sample MIME message • A text/html MIME mail message with pictures.

  12. Header 1st body part(text/html) 2nd body part(image/gif)

  13. Practices • Installing a Mail Server (Winmail is suggested) • Sending Email via Telnet • Receiving Email using Mail Reader • Setting up • Inside out the Message format • Monitoring the interaction of mail client and server using sockspy • Receiving Email via telnet (POP3) • Sending a Simple HTML mail • Sending a multimedia mail (html, image and attachments, refer to reference for online base64 encoding) • Writing a simple mail client using Tcl, PHP or... (better have SMTP Authentication support, hint: AUTH LOGIN and Tcllib base64 package)

  14. References • Computer Networks 4th Edition Chap7.2, Andrew S. Tanenbaum, Prentice Hall, 2003/03 • online base64 encoding • http://www.motobit.com/util/base64-decoder-encoder.asp • Sending e-mail via Telnet • http://www.activexperts.com/activemail/telnet/ • How to send an e-mail with attached file • http://www.hochfeiler.it/alvise/smtp.htm • Telnet POP3 Tutorial • http://manual.liquidweb.com/chapter3/pop3.htm • SMTP Auth Email Script (PHP) • http://codewalkers.com/getcode.php?id=538

More Related