TMail 0.11 Released

Discussion in 'Ruby' started by Mikel Lindsaar, Oct 24, 2007.

  1. 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
     
    Mikel Lindsaar, Oct 24, 2007
    #1
    1. Advertising

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


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

    James Edward Gray II
     
    James Edward Gray II, Oct 24, 2007
    #2
    1. Advertising

  3. 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
     
    Lionel Bouton, Oct 24, 2007
    #3
  4. 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
     
    Mikel Lindsaar, Oct 24, 2007
    #4
  5. Mikel Lindsaar 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
     
    Lionel Bouton, Oct 24, 2007
    #5
  6. Mikel Lindsaar

    Ari Brown Guest

    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.
     
    Ari Brown, Oct 24, 2007
    #6
  7. 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'] => ""
    mail['to'] = ""

    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 <> 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, Oct 25, 2007
    #7
  8. Oops... I mean,

    mail = TMail::Mail.parse(my_message_text)

    (capitalization and the ::Mail are important :)

    Mikel
     
    Mikel Lindsaar, Oct 25, 2007
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Roos
    Replies:
    1
    Views:
    166
    Jamis Buck
    Oct 6, 2005
  2. Michael Schuerig

    TMail and GPG/PGP encryption?

    Michael Schuerig, Oct 27, 2005, in forum: Ruby
    Replies:
    0
    Views:
    146
    Michael Schuerig
    Oct 27, 2005
  3. Replies:
    1
    Views:
    205
    Poornima Dhanasekar
    Feb 19, 2009
  4. John N. Alegre

    gems package for TMail

    John N. Alegre, Feb 25, 2006, in forum: Ruby
    Replies:
    0
    Views:
    95
    John N. Alegre
    Feb 25, 2006
  5. Mikel Lindsaar

    [ANN] TMail 1.1.1 Released

    Mikel Lindsaar, Nov 9, 2007, in forum: Ruby
    Replies:
    0
    Views:
    115
    Mikel Lindsaar
    Nov 9, 2007
Loading...

Share This Page