TMail 0.11 Released

Hello all,

I am now maintaining the TMail project with Trans. The RubyForge site is at:

http://tmail.rubyforge.org/

0.11 rolls up all the great patches that the Ruby on Rails team made
to their branch copy of Action Mailer. It includes a huge amount of
their test cases and also handles a bug where TMail was not handling
multipart emails correctly resulting in Multiplart emails just comming
through as raw plain text.

There is not a great functional change (only really that emails with
boundary strings that contain special characters are now recognized
and then double quoted by TMail if they weren't already) and mail.to_s
now returns those headers quoted where as accessing the header
parameter directly (like h.param['boundary']) will return it unquoted.

This should be a drop in replacement for anyone using a prior version of TMail.

Next on the cards immediately is:

* Gem version
* Clean up documentation on website
* RDoc documentation fully done
* More test cases and clean up test classes

Any bug reports and feature requests are appreciated, you can join the
mailing list at http://rubyforge.org/mailman/listinfo/tmail-talk

Regards

Mikel

You are a hero and songs will surely be sung of your deeds.

James Edward Gray II

···

On Oct 24, 2007, at 9:38 AM, Mikel Lindsaar wrote:

Next on the cards immediately is:

* Gem version
* Clean up documentation on website
* RDoc documentation fully done
* More test cases and clean up test classes

Mikel Lindsaar wrote the following on 24.10.2007 16:38 :

Hello all,

I am now maintaining the TMail project with Trans. The RubyForge site is at:

http://tmail.rubyforge.org/

0.11 rolls up all the great patches that the Ruby on Rails team made
to their branch copy of Action Mailer. It includes a huge amount of
their test cases and also handles a bug where TMail was not handling
multipart emails correctly resulting in Multiplart emails just comming
through as raw plain text.
  
With the Tmail version Rails is bundling with Rails 1.1.6 and 1.2.3 I
had to do this :

TMail::HeaderField::FNAME_TO_CLASS.delete 'content-id'

to generate HTML emails with inline images (the content-id header is
used to reference content to display inline). If I don't, content-id
headers specified when adding parts are not used and inline content
disappears...

This was reported to the Rails developpers (you can find it in their bug
database) but wasn't corrected last time I looked (lack of unit tests
and proper patch: http://dev.rubyonrails.org/ticket/2179\).

Are you aware of this problem?

Lionel

Awesome! So is it a library for just handling? Or does it can it also retrieve and send emails?

···

On Oct 24, 2007, at 10:38 AM, Mikel Lindsaar wrote:

Hello all,

I am now maintaining the TMail project with Trans. The RubyForge site is at:

http://tmail.rubyforge.org/

0.11 rolls up all the great patches that the Ruby on Rails team made
to their branch copy of Action Mailer. It includes a huge amount of
their test cases and also handles a bug where TMail was not handling
multipart emails correctly resulting in Multiplart emails just comming
through as raw plain text.

~ Ari
English is like a pseudo-random number generator - there are a bajillion rules to it, but nobody cares.

James: Aww... shucks... :slight_smile:

Lionel, no, not aware, I am talking with rails-contrib to merge the
versions so we only have to maintain one tree of code.

You could lead the way on this one and merge in 0.11 into your
actionmailer (should just plonk in OK) and try again.

All future changes to TMail will be put into the ruby forge project.
If you are game, we need any help we can get, open a ticket in Ruby
Forge, pick the first part to handle and submit a diff....

The quoting of message headers that I shoe horned into the code fixes
many small insidious problems as TMail was dropping headers seemingly
randomly... I think there is a lot more to be done here.

Regards

Mikel

Ari, right now it just handles Emails - and it is fairly good at it
actually Minero Aoki did a really good job on this library - Ruby on
Rails ActionMailer uses TMail as it's email abstraction that turns raw
email message text into a usable object.

In a nutshell, it lets you do:

  mail = Tmail.parse(my_message_text)
  mail['to'] => "mikel@example.com"
  mail['to'] = "mikel@somewhereelse.com"

etc etc etc.

In the site I use it for, I use Net::POP3 to get the email and then
parse it into a TMail object and work on it from there.

Though, I am thinking that having TMail wrap Net::POP3 and Net::SMTP
might not be a bad idea so you can do:

require 'tmail'
TMail.get_mail("my.pop.server", "myname", "mypass") do |m|
  # returns TMail object already parsed
  # do something with TMail object
end

Without having to do all the net stuff first. Saves a couple of steps.

But this is in the future... maybe a 1.1 release.

And if anyone is wondering, we will be getting it up to 1.0 pretty
fast, once the key bugs are ironed out.

Regards

Mikel

···

On 10/25/07, Ari Brown <ari@aribrown.com> wrote:

Awesome! So is it a library for just handling? Or does it can it also
retrieve and send emails?

On Oct 24, 2007, at 10:38 AM, Mikel Lindsaar wrote:

> Hello all,
>
> I am now maintaining the TMail project with Trans. The RubyForge
> site is at:
>
> http://tmail.rubyforge.org/
>
> 0.11 rolls up all the great patches that the Ruby on Rails team made
> to their branch copy of Action Mailer. It includes a huge amount of
> their test cases and also handles a bug where TMail was not handling
> multipart emails correctly resulting in Multiplart emails just comming
> through as raw plain text.

~ Ari
English is like a pseudo-random number generator - there are a
bajillion rules to it, but nobody cares.

Mikel Lindsaar wrote:

James: Aww... shucks... :slight_smile:

Lionel, no, not aware, I am talking with rails-contrib to merge the
versions so we only have to maintain one tree of code.

You could lead the way on this one and merge in 0.11 into your
actionmailer (should just plonk in OK) and try again.
  
My main reason for asking was because I didn't had the time to fully
understand TMail handling of headers. I strongly suspect my quick hack
is not the right solution so I wouldn't submit it as-is... Fortunately
it seems you already know header handling isn't top-notch and needs some
love :slight_smile:

Regards,

Lionel

Oops... I mean,

mail = TMail::Mail.parse(my_message_text)

(capitalization and the ::Mail are important :slight_smile:

Mikel