TMail 0.11 Released

M

Mikel Lindsaar

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
 
J

James Edward Gray II

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 Gray II
 
L

Lionel Bouton

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
 
M

Mikel Lindsaar

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
 
L

Lionel Bouton

Mikel said:
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
 
A

Ari Brown

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


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

Mikel Lindsaar

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'] => "(e-mail address removed)"
mail['to'] = "(e-mail address removed)"

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
 
M

Mikel Lindsaar

Oops... I mean,

mail = TMail::Mail.parse(my_message_text)

(capitalization and the ::Mail are important :)

Mikel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top