From: merlin hughes <>
Subject: RubyMail compliments + suggestions
To: matt@lickey.com
Date: Sun Feb 15 14:03:16 2004 -0800
[1. text/plain]
Hi Matt,
I just wanted to compliment you on RubyMail. I've long wanted to write a
plaintext mail viewer for mh, but to date never found a suitable streaming
parser. I ran across RubyMail last week, and it does exactly what I want.
The viewer itself is at http://merlin.org/ruby/ .. I don't claim that
it is any good; it merely satisfies my particular needs. Plus, I am a
complete Ruby neophyte - I only started using it in response to finding
RubyMail - so it is not an elegant program.
However, in order to handle signed and embedded MIME messages, I ran
across a few issues; I don't know if you would want to address them in
RubyMail itself:
1. Forced MIME parsing
----------------------
The content of an encapsulated S/MIME message (application/pkcs7-mime)
is a MIME part, but it may not include a MIME-Version header; it can
just look like this:
--8<--
Content-Type: multipart/alternative;
boundary="--=_NextPart_STJ_44733632.104408079"
----=_NextPart_STJ_44733632.104408079
...
----=_NextPart_STJ_44733632.104408079--
-->8--
RubyMail won't parse this correctly because it doesn't know that it
is MIME. Would you consider adding a parse_mime method to parser.rb
that forces MIME parsing?
def parse_mime # :nodoc:
input = RMail::Parser::PushbackReader.new(@input)
input.chunk_size = @chunk_size if @chunk_size
parse_low(input, 1)
return nil
end
I can obviously (and do) mix this in myself, but it seems like it could
be generally useful.
|