From concierge at powerupdev.com Mon Feb 11 12:43:40 2008
From: concierge at powerupdev.com (Tim Case)
Date: Mon, 11 Feb 2008 14:43:40 -0300
Subject: [Tmail-talk] Tmail bug on multiple froms?
Message-ID:
It appears TMail doesn't handle multiple froms correctly. Given the
header portion of an RFC822 mail below:
... "To: tim at powerupdev.com concierge at powerupdev.com\r\nFrom: tim at powerupdev.com
concierge at powerupdev.com\r\nSubject: /home/svn/public/minebox
revision 214\r\n" ...
I would expect
tmail_parsed_message.from = ['tim at powerupdev.com', 'concierge at powerupdev.com
']
instead I get nil.
Is this a bug?
Thanks for TMail,
Tim Case
From aquasync at gmail.com Fri Feb 29 04:54:56 2008
From: aquasync at gmail.com (charles)
Date: Fri, 29 Feb 2008 20:54:56 +1100
Subject: [Tmail-talk] TMail preamble usage
Message-ID: <89bd8880802290154i2ede0316s915a1217646ce82d@mail.gmail.com>
Hi Tmail chaps :)
A quick query about preamble usage in TMail. Its currently an alias for
body, which seems strange. I'd have thought that preamble is supposed to be
the converse to epilogue.
Eg:
>> mail = TMail::Mail.parse "Content-Type: multipart/related;
boundary=asdf\n\nThis is a mime message\n--asdf\nContent-Type:
text/plain\n\npart 1\n--asdf--\nEpilogue"
=> # bodyport=nil>
>> mail.body
=> "part 1\n"
>> mail.parts.first.body
=> "part 1\n"
>> mail.quoted_body
=> "This is a mime message\n"
>> mail.preamble
=> "part 1\n"
>> q.epilogue
=> "Epilogue"
Is there a reason for this behaviour? I'm pretty sure rfc822 preamble is
just that first chunk...
Thanks,
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/tmail-talk/attachments/20080229/b77f74b5/attachment.html
From maarten at solovirtuoso.com Fri Feb 29 05:43:41 2008
From: maarten at solovirtuoso.com (Maarten Oelering)
Date: Fri, 29 Feb 2008 11:43:41 +0100
Subject: [Tmail-talk] TMail preamble usage
In-Reply-To: <89bd8880802290154i2ede0316s915a1217646ce82d@mail.gmail.com>
References: <89bd8880802290154i2ede0316s915a1217646ce82d@mail.gmail.com>
Message-ID:
Hi,
The preamble is normally the part before the first boundary
delimiter. So it should have returned the text "This is a mime message".
See also the following quote from RFC 2046:
There appears to be room for additional information prior to the
first boundary delimiter line and following the final boundary
delimiter line. These areas should generally be left blank, and
implementations must ignore anything that appears before the first
boundary delimiter line or after the last one.
NOTE: These "preamble" and "epilogue" areas are generally not used
because of the lack of proper typing of these parts and the lack of
clear semantics for handling these areas at gateways, particularly
X.400 gateways. However, rather than leaving the preamble area
blank, many MIME implementations have found this to be a convenient
place to insert an explanatory note for recipients who read the
message with pre-MIME software, since such notes will be ignored by
MIME-compliant software.
Cheers,
Maarten
On 29-feb-2008, at 10:54, charles wrote:
> Hi Tmail chaps :)
>
> A quick query about preamble usage in TMail. Its currently an alias
> for body, which seems strange. I'd have thought that preamble is
> supposed to be the converse to epilogue.
>
> Eg:
>
> >> mail = TMail::Mail.parse "Content-Type: multipart/related;
> boundary=asdf\n\nThis is a mime message\n--asdf\nContent-Type: text/
> plain\n\npart 1\n--asdf--\nEpilogue"
> => # ..fdbb86ab8> bodyport=nil>
> >> mail.body
> => "part 1\n"
> >> mail.parts.first.body
> => "part 1\n"
> >> mail.quoted_body
> => "This is a mime message\n"
> >> mail.preamble
> => "part 1\n"
> >> q.epilogue
> => "Epilogue"
>
> Is there a reason for this behaviour? I'm pretty sure rfc822
> preamble is just that first chunk...
>
> Thanks,
>
> Charles
> _______________________________________________
> Tmail-talk mailing list
> Tmail-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/tmail-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/tmail-talk/attachments/20080229/a41482a7/attachment.html
From raasdnil at gmail.com Fri Feb 29 09:04:02 2008
From: raasdnil at gmail.com (Mikel Lindsaar)
Date: Sat, 1 Mar 2008 01:04:02 +1100
Subject: [Tmail-talk] TMail preamble usage
In-Reply-To: <89bd8880802290154i2ede0316s915a1217646ce82d@mail.gmail.com>
References: <89bd8880802290154i2ede0316s915a1217646ce82d@mail.gmail.com>
Message-ID: <57a815bf0802290604y7be606ey3be896eea9efd2fe@mail.gmail.com>
On Fri, Feb 29, 2008 at 8:54 PM, charles wrote:
> Hi Tmail chaps :)
G'Day :)
> Is there a reason for this behaviour? I'm pretty sure rfc822 preamble is
> just that first chunk...
There reason for the behaviour is this bit of code is in lib/mail.rb:
alias preamble body
alias preamble= body=
It would be good to change it to the RFC, and at a quick glance, it
would need a good test case or two written and then a re-work of how
"read_multipart( src )" on line 500 of lib/mail.rb. Actually doesn't
look toooo hard to fix, would just take putting something in before
the first while loop to grab the preamble.
It would be great if you could take a shot at fixing it an putting a
patch on our ruby forge page, there is a contributing to TMail page on
the main tmail website.
Right now I am concentrating on documentation, I have done about 500 +
more lines of documentation and am trying to split out private methods
from public methods and simplify the interfact to TMail a bit...
getting there, but it is chewing up my TMail Time at a rapid rate :)
Let me know what you think.
Mikel