You are previewing Programming Internet Email.
O'Reilly logo
Programming Internet Email

Book Description

The Internet's "killer app" is not the World Wide Web or Pushtechnologies: it is humble electronic mail. More people use emailthan any other Internet application. As the number of email usersswells, and as email takes on an ever greater role in personal andbusiness communication, Internet mail protocols have become notjust an enabling technology for messaging, but a programminginterface on top of which core applications are built.Programming Internet Email unmasks the Internet Mail Systemand shows how a loose federation of connected networks havecombined to form the world's largest and most heavily traffickedmessage system. Programming Internet Email tames theInternet's most popular messaging service. For programmers buildingapplications on top of email capabilities, and power users tryingto get under the hood of their own email systems, ProgrammingInternet Email stands out as an essential guide and referencebook. In typical O'Reilly fashion, Programming InternetEmail covers the topic with nineteen tightly written chaptersand five useful appendixes. Following a thorough introduction tothe Internet Mail System, the book is divided into five parts:

  • Part I covers email formats, from basic text messages to theguts of MIME. Secure email message formats (OpenPGP and S/MIME),mailbox formats and other commonly used formats are detailed inthis reference section.

  • Part II describes Internet email protocols: SMTP and ESMTP,POP3 and IMAP4. Each protocol is covered in detail to expose theInternet Mail System's inner workings.

  • Part III provides a solid API reference for programmers workingin Perl and Java. Class references are given for commonly used Perlmodules that relate to email and the Java Mail API.

  • Part IV provides clear and concise examples of how toincorporate email capabilities into your applications. Examples aregiven in both Perl and Java.

  • Part V covers the future of email on the Internet. Means andmethods for controlling spam email and newly proposed Internet mailprotocols are discussed.

  • Appendixes to Programming Internet Email provide a host ofexplanatory information and useful references for the programmerand avid user alike, including a comprehensive list of InternetRFCs relating to email, MIME types and a list of email relatedURLs.

  • Programming Internet Email will answer all of your questionsabout mail and extend your abilities into this most popularmessaging frontier.

    Table of Contents

    1. Programming Internet Email
      1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
      2. A Note Regarding Supplemental Files
      3. Preface
        1. How This Book Is Organized
        2. Conventions Used in This Book
        3. Resources
        4. Related Books
        5. We'd Like to Hear From You
        6. Acknowledgments
      4. 1. Electronic Mail on the Internet
        1. Email Systems
          1. Internet Email
          2. X.400 Email
          3. Proprietary Email Systems
        2. Internet Email Standards
        3. Tools of the Trade
        4. The Basic Internet Email System
          1. Gateways to Foreign Mail Systems
          2. Sending Mail from MUAs
          3. Transferring Mail by MTAs
            1. Anti-spamming MTAs
            2. Types of MTAs
          4. Delivery of Mail by MDAs
          5. Retrieval of Mail by MRAs
          6. Receiving Mail by MUAs
      5. 2. Simple Text Messages
        1. Internet Text Messages
        2. Think Globally, Act Locally
        3. Headers
          1. Some Notes on Headers
            1. Long headers
            2. Order of headers
            3. Limitations on originator headers
        4. Mandatory Headers
          1. Optional Headers
          2. Dynamic Headers
        5. User-Defined Headers
        6. Address Formats
      6. 3. Multipurpose Internet Mail Extensions
        1. Mail with Attitude
        2. MIME Header Fields
        3. MIME Encoding
          1. 7-bit, 8-bit, and Binary
          2. Quoted-Printable
            1. An example of quoted-printable encoding
            2. Decoding quoted-printable
          3. base64
            1. An example of base64 encoding
            2. Decoding base64
        4. MIME Boundaries
        5. MIME Summary
          1. Encoding Gotchas
      7. 4. Creating MIME-Compliant Messages
        1. The Minimal MIME Message
        2. Multipart Messages
        3. Nested Body Parts
        4. A Few Interesting MIME Types
          1. The message/external-body Type
          2. The message/partial Type
          3. The multipart/alternative Type
        5. MIME Message Creation Gotchas
      8. 5. OpenPGP and S/MIME
        1. An Extremely Brief Introduction to Security Concepts
        2. An Overview of OpenPGP and S/MIME
        3. Combining Security and MIME
          1. The multipart/signed MIME Type
          2. The multipart/encrypted MIME type
        4. The OpenPGP Format
        5. The S/MIME Format
      9. 6. vCard
        1. Personal Data Interchange with vCard
        2. The vCard Version 3.0 Profile
        3. Version 3.0 Housekeeping Types
        4. Version 3.0 Identification Types
        5. The vCard Version 2.1 Profile
        6. Attaching vCards to Email Messages
      10. 7. Mailbox Formats
        1. mbox
        2. Common mbox Variations
        3. Variation for lMAP Mailboxes
        4. MH
        5. Maildir
      11. 8. Mailcap Files
        1. Mailcap File Format
        2. Implementation Under Unix Operating Systems
        3. Implementation Under Other Operating Systems
      12. 9. The Extended Simple Mail Transfer Protocol
        1. Using ESMTP
        2. ESMTP Commands
          1. Mail Transaction Commands
        3. ESMTP Sessions
      13. 10. The Post Office Protocol
        1. Using POP
          1. Comparing POP and IMAP
        2. POP Commands
          1. The Authorization State
            1. Username/password authentication
            2. APOP authentication
            3. AUTH authentication
          2. The Transaction State
          3. The Update State
        3. POP Sessions
      14. 11. The Internet Message Access Protocol
        1. Using IMAP
        2. IMAP Commands
        3. The Nonauthenticated State
        4. The Authenticated State
        5. The Selected State
        6. IMAP Sessions
      15. 12. The Application Configuration Access Protocol
        1. Using ACAP
        2. ACAP Datasets
        3. Access Control
        4. Example Dataset
        5. ACAP Commands
        6. The Nonauthenticated State
        7. The Authenticated State
        8. ACAP Sessions
      16. 13. Email-Related Perl Modules
        1. Finding and Installing Perl Modules
        2. Maturity of the Mail-Related Modules
          1. Contributing to the Effort
        3. Email-Related Modules Quick Reference
          1. Reading an Entry
            1. Version information
            2. Dependencies
            3. Synopsis
          2. MIME-Base64
          3. MIME-Lite
          4. MIME-tools
          5. MailCclient
          6. MailFolder
          7. MailTools
          8. Libnet
          9. POP3Client
      17. 14. The Java Mail API
        1. An Overview of the Java Mail API
        2. Java Mail API Reference
          1. Reading an Entry
          2. The javax.mail Package
            1. javax.mail.MessageAware
            2. javax.mail.MultipartDataSource
            3. javax.mail.Part
            4. javax.mail.UIDFolder
            5. javax.mail.Address
            6. javax.mail.Authenticator
            7. javax.mail.BodyPart
            8. javax.mail.FetchProfile
            9. javax.mail.FetchProfile.Item
            10. javax.mail.Flags
            11. javax.mail.Flags.Flag
            12. javax.mail.Folder
            13. javax.mail.Header
            14. javax.mail.Message
            15. javax.mail.Message.RecipientType
            16. javax.mail.MessageContext
            17. javax.mail.Multipart
            18. javax.mail.PasswordAuthentication
            19. javax.mail.Provider
            20. javax.mail.Provider.Type
            21. javax.mail.Service
            22. javax.mail.Session
            23. javax.mail.Store
            24. javax.mail.Transport
            25. javax.mail.URLName
            26. javax.mail.UIDFolder.FetchProfileItem
            27. javax.mail.AuthenticationFailedException
            28. javax.mail.FolderClosedException
            29. javax.mail.FolderNotFoundException
            30. javax.mail.IllegalWriteException
            31. javax.mail.MessageRemovedException
            32. javax.mail.MessagingException
            33. javax.mail.MethodNotSupportedException
            34. javax.mail.NoSuchProviderException
            35. javax.mail.SendFailedException
            36. javax.mail.StoreClosedException
        3. The javax.mail.internet Package
          1. javax.mail.internet.MimePart
          2. javax.mail.internet.ContentType
          3. javax.mail.internet.HeaderTokenizer
          4. javax.mail.internet.HeaderTokenizer.Token
          5. javax.mail.internet.InternetAddress
          6. javax.mail.internet.InternetHeaders
          7. javax.mail.internet.MimeBodyPart
          8. javax.mail.internet.MimeMessage
          9. javax.mail.internet.MimeMessage.RecipientType
          10. javax.mail.internet.MimeMultipart
          11. javax.mail.internet.MimePartDataSource
          12. javax.mail.internet.MimeUtility
          13. javax.mail.internet.NewsAddress
          14. javax.mail.internet.ParameterList
          15. javax.mail.internet.AddressException
          16. javax.mail.internet.ParseException
        4. The javax.mail.search Package
          1. javax.mail.search.AddressStringTerm
          2. javax.mail.search.AddressTerm
          3. javax.mail.search.AndTerm
          4. javax.mail.search.BodyTerm
          5. javax.mail.search.DateTerm
          6. javax.mail.search.ComparisonTerm
          7. javax.mail.search.FlagTerm
          8. javax.mail.search.FromStringTerm
          9. javax.mail.search.FromTerm
          10. javax.mail.search.HeaderTerm
          11. javax.mail.search.IntegerComparisonTerm
          12. javax.mail.search.MessageIDTerm
          13. javax.mail.search.MessageNumberTerm
          14. javax.mail.search.NotTerm
          15. javax.mail.search.OrTerm
          16. javax.mail.search.ReceivedDateTerm
          17. javax.mail.search.RecipientStringTerm
          18. javax.mail.search.RecipientTerm
          19. javax.mail.search.SearchTerm
          20. javax.mail.search.SentDateTerm
          21. javax.mail.search.SizeTerm
          22. javax.mail.search.StringTerm
          23. javax.mail.search.SubjectTerm
          24. javax.mail.search.SearchException
        5. The javax.mail.event Package
          1. javax.mail.event.ConnectionListener
          2. javax.mail.event.FolderListener
          3. javax.mail.event.MessageChangedListener
          4. javax.mail.event.MessageCountListener
          5. javax.mail.event.MailEvent
          6. javax.mail.event.StoreListener
          7. javax.mail.event.StoreEvent
          8. javax.mail.event.TransportListener
          9. javax.mail.event.ConnectionAdapter
          10. javax.mail.event.ConnectionEvent
          11. javax.mail.event.FolderAdapter
          12. javax.mail.event.FolderEvent
          13. javax.mail.event.MessageChangedEvent
          14. javax.mail.event.MessageCountAdapter
          15. javax.mail.event.MessageCountEvent
          16. javax.mail.event.TransportAdapter
          17. javax.mail.event.TransportEvent
      18. 15. Creating and Sending a Multipart Mail Message
        1. Designing a MIME-Capable Replacement for /bin/mail
        2. Creating mail.pl
        3. Extending and Enhancing mail.pl
        4. Sending MIME Email via Java
      19. 16. Archiving and Cleaning a Mailbox
        1. Scrubbing Unwanted MIME Attachments
        2. Creating mboxscrub.pl
        3. Extending and Enhancing mboxscrub.pl
      20. 17. Watching an IMAP Mailbox
        1. Designing JBiff
        2. Creating JBiff
        3. Extending JBiff
      21. 18. Anti-Spamming Techniques
        1. The UCE Problem
        2. Recipient Approaches
          1. Filtering Incoming Messages
          2. Revenge
        3. Service Provider Approaches
          1. MTA Controls
          2. Contractual Controls
        4. Legislative Approaches
      22. 19. The Future of Email
        1. Trends in MUAs
        2. Trends with Web-based Mail
        3. Trends Inside Firewalls
      23. A. Internet RFCs Relating to Email
      24. B. MIME Media Types
      25. C. ASCII
      26. D. Mail-Related URLs
      27. E. Glossary
      28. Index
      29. Colophon
      30. SPECIAL OFFER: Upgrade this ebook with O’Reilly