# TMail 0.11 Released

**URL:** <https://www.ruby-forum.com/t/tmail-0-11-released/118186>\
**Category:** Ruby\
**Created:** [October 24, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186 "2007-10-24T16:39:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 24, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/1 "2007-10-24T16:39:48Z")

</div>

Hello all,

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

[http://tmail.rubyforge.org/](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](http://rubyforge.org/mailman/listinfo/tmail-talk)

Regards

Mikel

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 24, 2007, 4:52pm UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/2 "2007-10-24T16:52:42Z")

</div>

On Oct 24, 2007, at 9:38 AM, Mikel L. 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

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

James Edward G. II

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 24, 2007, 5:24pm UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/3 "2007-10-24T17:24:57Z")

</div>

Mikel L. wrote the following on 24.10.2007 16:38 :

> 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](http://dev.rubyonrails.org/ticket/2179)).

Are you aware of this problem?

Lionel

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 24, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/4 "2007-10-24T18:01:16Z")

</div>

James: Aww… shucks… 🙂

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

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 24, 2007, 9:43pm UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/5 "2007-10-24T21:43:22Z")

</div>

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 L. wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 24, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/6 "2007-10-24T19:23:50Z")

</div>

Mikel L. wrote:

> James: Aww… shucks… 🙂
> 
> 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 🙂

Regards,

Lionel

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 25, 2007, 1:42am UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/7 "2007-10-25T01:42:02Z")

</div>

Ari, right now it just handles Emails - and it is fairly good at it  
actually Minero A. 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’] =\> “removed\_email\_address@domain.invalid”  
mail[‘to’] = “removed\_email\_address@domain.invalid”

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

---

<div class="post-metadata">

**Author:** ![Mikel\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Post date:** [October 25, 2007, 2:32am UTC](https://www.ruby-forum.com/t/tmail-0-11-released/118186/8 "2007-10-25T02:32:50Z")

</div>

Oops… I mean,

mail = TMail::Mail.parse(my\_message\_text)

(capitalization and the ::Mail are important 🙂

Mikel
