Hi:
Is there a mail parser for netscape mail files.
I tried tmail, but it doesn’t seem to work
with the netscape format.
···
–
Jim Freeze
Hofstadter’s Law:
It always takes longer than you expect, even when you take
Hofstadter’s Law into account.
Jim Freeze jim@freeze.org writes:
Is there a mail parser for netscape mail files.
I tried tmail, but it doesn’t seem to work
with the netscape format.
Netscape just uses mbox format for its mail files. This should be
parseable by TMail::UNIXMbox, but when I try it, I get IOErrors every
time I try to do IO within TMail::UNIXMbox#each:
irb(main):021:0> var = ‘hi’
=> “hi”
irb(main):022:0> mbox = TMail::UNIXMbox.new(‘mbox’)
=> #<TMail::UNIXMbox:0x4034fc84 @closed=false, @readonly=false, @finalizer=#Proc:0x4034fc20, @filename=“mbox”, @real=#<TMail::MhMailbox /tmp/ruby_tmail_4574_0.6634130709>>
irb(main):023:0> puts “var: [#{var}]”
var: [hi]
=> nil
irb(main):024:0> mbox.each{|port| puts “var: [#{var}]” }
IOError: not opened for writing
from /usr/lib/ruby/1.6/tmail/mailbox.rb:280:in truncate' from /usr/lib/ruby/1.6/tmail/mailbox.rb:280:in
update’
from /usr/lib/ruby/1.6/tmail/mailbox.rb:260:in lock' from /usr/lib/ruby/1.6/tmail/mailbox.rb:260:in
update’
from /usr/lib/ruby/1.6/tmail/mailbox.rb:216:in `each_port’
from (irb):24
Looks like a bug to me.
-=Eric
···
–
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
– Blair Houghton.