<commit_before>= Mail

== Introduction

Mail is an internet library for Ruby that is designed to handle emails
generation, parsing and sending in a simple, rubyesque manner.

The purpose of this library is to provide a single point of access to handle
all email functions, including sending and receiving emails.  All network
type actions are done through proxy methods to Net::SMTP, Net::POP3 etc.

Built from my experience with TMail, it is designed to be a pure ruby
implementation that makes generating, sending and parsing emails a no
brainer.

It is also designed form the ground up to work with Ruby 1.9.  This is because
Ruby 1.9 handles text encodings much more magically than Ruby 1.8.x and so
these features have been taken full advantage of in this library allowing
Mail to handle a lot more messages more cleanly than TMail.  Mail does run on
Ruby 1.8.x... it's just not as fun to code.

Finally, Mail has been designed with a very simple object oriented system
that really opens up the email messages you are parsing, if you know what
you are doing, you can fiddle with every last bit of your email directly.

== Current Capabilities of Mail

* RFC2822 Support, Reading and Writing
* RFC2045-2049 Support for multipart emails (no smarts yet)
* Support for creating multipart alternate emails (see below)
* Support for reading multipart/report emails & getting details from such
* Wrappers for File, Net/POP3, Net/SMTP

Mail is RFC2822 compliant now, that is, it can parse and generate valid US-ASCII
emails.  There are a few obsoleted syntax emails that it will have problems with, but
it also is quite robust, meaning, if it finds something it doesn't understand it will
not crash, instead, it will skip the problem and keep parsing.  In the case of a header
it doesn't understand, it will initialize the header as an optional unstructured
field and continue parsing.

This means Mail won't (ever) crunch your data (we think).

You can also create a MIME email.  There are helper methods for making a 
multipart/alternate email for text/plain and text/html (the most common pair)
and you can manually create any other type of MIME email.

== Roadmap

Next TODO:

* Finish MIME multipart handling. Add easy helpers for images and files etc.
* Include MIME file type detection for default file attachment and detachment
behaviour
* Add encoding support for bodies that intelligently decodes body text based on 
content-type and content-transfer-encoding headers
* Add multilingual MIME support for non US-ASCII headers
* Add IMAP wrapper
* Release Mail as a Gem and bask in it's glitter

== Testing Policy

Basically... we do BDD on Mail.  No method gets written in Mail without a
corresponding or covering spec.  We expect as a minimum 100% coverage
measured by RCov.  While this is not perfect by any measure, it is pretty
good.  Additionally, all functional tests from TMail are to be passing before
the gem gets released.

It also means you can be sure Mail will behave correctly.

== API Policy

Right now Mail is still under development for a 1.0 release.

The API will change between now and 1.0.  How much?  Not sure.  Basically though
once 1.0 is released, no API removals within a single point release.  All removals
to be depreciated with warnings for at least one point release before removal.

Also, all private or protected methods to be declared as such.<commit_msg>Updated TODO list in README<commit_after>= Mail

== Introduction

Mail is an internet library for Ruby that is designed to handle emails
generation, parsing and sending in a simple, rubyesque manner.

The purpose of this library is to provide a single point of access to handle
all email functions, including sending and receiving emails.  All network
type actions are done through proxy methods to Net::SMTP, Net::POP3 etc.

Built from my experience with TMail, it is designed to be a pure ruby
implementation that makes generating, sending and parsing emails a no
brainer.

It is also designed form the ground up to work with Ruby 1.9.  This is because
Ruby 1.9 handles text encodings much more magically than Ruby 1.8.x and so
these features have been taken full advantage of in this library allowing
Mail to handle a lot more messages more cleanly than TMail.  Mail does run on
Ruby 1.8.x... it's just not as fun to code.

Finally, Mail has been designed with a very simple object oriented system
that really opens up the email messages you are parsing, if you know what
you are doing, you can fiddle with every last bit of your email directly.

== Current Capabilities of Mail

* RFC2822 Support, Reading and Writing
* RFC2045-2049 Support for multipart emails (no smarts yet)
* Support for creating multipart alternate emails (see below)
* Support for reading multipart/report emails & getting details from such
* Wrappers for File, Net/POP3, Net/SMTP

Mail is RFC2822 compliant now, that is, it can parse and generate valid US-ASCII
emails.  There are a few obsoleted syntax emails that it will have problems with, but
it also is quite robust, meaning, if it finds something it doesn't understand it will
not crash, instead, it will skip the problem and keep parsing.  In the case of a header
it doesn't understand, it will initialize the header as an optional unstructured
field and continue parsing.

This means Mail won't (ever) crunch your data (we think).

You can also create a MIME email.  There are helper methods for making a 
multipart/alternate email for text/plain and text/html (the most common pair)
and you can manually create any other type of MIME email.

== Roadmap

Next TODO:

* Add multilingual MIME support for non US-ASCII headers
* Add IMAP wrapper
* Release Mail as a Gem and bask in it's glitter

== Testing Policy

Basically... we do BDD on Mail.  No method gets written in Mail without a
corresponding or covering spec.  We expect as a minimum 100% coverage
measured by RCov.  While this is not perfect by any measure, it is pretty
good.  Additionally, all functional tests from TMail are to be passing before
the gem gets released.

It also means you can be sure Mail will behave correctly.

== API Policy

Right now Mail is still under development for a 1.0 release.

The API will change between now and 1.0.  How much?  Not sure.  Basically though
once 1.0 is released, no API removals within a single point release.  All removals
to be depreciated with warnings for at least one point release before removal.

Also, all private or protected methods to be declared as such.
{'fraction_non_alphanumeric': 0.03781706379707917, 'fraction_numerical': 0.010760953112990008, 'mean_word_length': 4.1228346456692915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4346747', 'n_tokens_mistral': 1741, 'n_tokens_neox': 1621, 'n_words': 1061}