Hey all I''m trying to use TMail to parse some emails in my inbox, and to strip the pictures from them, saving them to another directory, for what will eventually become a claws action. It''s a very simple script, which I saved to a pastie ( http://pastie.caboo.se/181721 ). When I run it, it takes a noticeable amount of time to run, but doesn''t output any images, or any information from the inspect. Any pointers would be appreciated, Jon
> Hey all > > I''m trying to use TMail to parse some emails in my inbox, and to strip the pictures from them, saving them to another directory, for what will eventually become a claws action. It''s a very simple script, which I saved to a pastie ( http://pastie.caboo.se/181721 ). When I run it, it takes a noticeable amount of time to run, but doesn''t output any images, or any information from the inspect. > > Any pointers would be appreciated, > Jon > >As an addendum to this email, if I seperate things out somewhat, to add: email = TMail::Mail.load ( ARGV[0] ) puts email.body email.attachments ... Then it shows that the message has several attachments, though still, the block isn''t called. Regards, Jonathan
I think you''d need to change it to ".attachments.each do |attach|" no? On Thu, Apr 17, 2008 at 3:13 AM, Jonathan Stott <jonathan.stott at gmail.com> wrote:> > Hey all > > > > I''m trying to use TMail to parse some emails in my inbox, and to strip > the pictures from them, saving them to another directory, for what will > eventually become a claws action. It''s a very simple script, which I saved > to a pastie ( http://pastie.caboo.se/181721 ). When I run it, it takes a > noticeable amount of time to run, but doesn''t output any images, or any > information from the inspect. > > > > Any pointers would be appreciated, > > Jon > > > > > > As an addendum to this email, if I seperate things out somewhat, to add: > > email = TMail::Mail.load ( ARGV[0] ) > > puts email.body > > email.attachments ... > > Then it shows that the message has several attachments, though still, the > block isn''t called. > > Regards, > Jonathan > _______________________________________________ > 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/20080417/515f4490/attachment-0001.html
On Wed, Apr 16, 2008 at 11:12 PM, charles <aquasync at gmail.com> wrote:> I think you''d need to change it to ".attachments.each do |attach|" no?... ... Yes. Yes, I would. ^^; Ooops. Oh well, thank you for pointing out the obvious for me :) Regards, Jon