From jemminger at gmail.com Mon Nov 3 13:59:11 2008 From: jemminger at gmail.com (jeff emminger) Date: Mon, 3 Nov 2008 13:59:11 -0500 Subject: [Tmail-talk] setting message_id Message-ID: <8b109c50811031059q78f1c151sc8ca68bfef959feb@mail.gmail.com> How can I set the Message-ID header of a TMail::Mail? If I use the message_id method, it is overwritten when I send the mail, as the sending methods call ready_to_send, which overwrites the Message-ID I have set. Thanks, Jeff From raasdnil at gmail.com Mon Nov 3 19:57:14 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Tue, 4 Nov 2008 11:57:14 +1100 Subject: [Tmail-talk] setting message_id In-Reply-To: <8b109c50811031059q78f1c151sc8ca68bfef959feb@mail.gmail.com> References: <8b109c50811031059q78f1c151sc8ca68bfef959feb@mail.gmail.com> Message-ID: <57a815bf0811031657l4014b351t2eacc04f6cda5462@mail.gmail.com> On Tue, Nov 4, 2008 at 5:59 AM, jeff emminger wrote: > How can I set the Message-ID header of a TMail::Mail? If I use the > message_id method, it is overwritten when I send the mail, as the > sending methods call ready_to_send, which overwrites the Message-ID I > have set. I think someone has asked for this before. I'd be willing to add it as a feature. Can you raise a feature request at the TMail rubyforge page? In the mean time, you could monkey patch like so (warning, this is untested, but should work) module TMail class Mail def add_message_id( fqdn = nil ) self.message_id ||= ::TMail::new_message_id(fqdn) end end end -- http://lindsaar.net/ Rails, RSpec and Life blog.... From mikemondragon at gmail.com Mon Nov 10 21:23:11 2008 From: mikemondragon at gmail.com (Mike Mondragon) Date: Mon, 10 Nov 2008 18:23:11 -0800 Subject: [Tmail-talk] problems with gem installing Tmail with Ruby 1.9.1-preview on Linux Message-ID: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> I'm having problems installing Tmail using the Ruby 1.9.1-preview release in a Linux Ubuntu Desktop http://www.ruby-lang.org/en/news/2008/10/28/ruby-1-9-1-preview-1-released/ My problem is likely related to my installation environment so hopefully someone else has overcome my experiences. I compile Ruby with a '19' suffix (e.g. ./configure --program-suffix=19 && make && sudo make install) and install to /user/local , thus my ruby is named /usr/local/bin/ruby19 I then install RubyGems 1.3.1 by hand 'sudo ruby19 setup.rb' which installs a Ruby 1.9 based gem, gem19 I then install Tmail from the latest gem file 'sudo gem19 install tmail-1.2.3.1.gem' Below is the error I get, the obvious offender is tmailscanner.c:19:16: error: re.h: No such file or directory so I'm not sure why the 1.9.1 version of re.h is not being installed when Ruby 1.9 is installed. And the actual 1.9.1 re.h RString struct doesn't have a member name ptr. Thanks in advance for any help I can get with this. sudo gem19 install tmail-1.2.3.1.gem [sudo] password for mike: Building native extensions. This could take a while... ERROR: Error installing tmail-1.2.3.1.gem: ERROR: Failed to build gem native extension. /usr/local/bin/ruby19 extconf.rb install tmail-1.2.3.1.gem creating Makefile make gcc -I. -I/usr/local/include/ruby19-1.9.1/i686-linux -I/usr/local/include/ruby19-1.9.1/ruby/backward -I/usr/local/include/ruby19-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -O2 -g -Wall -Wno-parentheses -D_FILE_OFFSET_BITS=64 -o tmailscanner.o -c tmailscanner.c tmailscanner.c:19:16: error: re.h: No such file or directory tmailscanner.c: In function 'mails_s_new': tmailscanner.c:75: error: 'struct RString' has no member named 'ptr' tmailscanner.c:77: error: 'struct RString' has no member named 'len' tmailscanner.c: In function 'skip_japanese_string': tmailscanner.c:188: warning: implicit declaration of function 'ismbchar' tmailscanner.c:189: warning: implicit declaration of function 'mbclen' tmailscanner.c: In function 'digit_p': tmailscanner.c:379: error: 'struct RString' has no member named 'ptr' tmailscanner.c:380: error: 'struct RString' has no member named 'len' tmailscanner.c:381: error: 'struct RString' has no member named 'ptr' tmailscanner.c:381: error: 'struct RString' has no member named 'ptr' tmailscanner.c: In function 'atomsym': tmailscanner.c:399: error: 'struct RString' has no member named 'ptr' tmailscanner.c: In function 'debug_print': tmailscanner.c:420: error: 'struct RString' has no member named 'ptr' tmailscanner.c:421: error: 'struct RString' has no member named 'ptr' make: *** [tmailscanner.o] Error 1 Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1 for inspection. Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/ext/tmailscanner/tmail/gem_make.out -- Mike Mondragon Work> http://sas.quat.ch/ Blog> http://blog.mondragon.cc/ From raasdnil at gmail.com Tue Nov 11 21:18:16 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Wed, 12 Nov 2008 13:18:16 +1100 Subject: [Tmail-talk] problems with gem installing Tmail with Ruby 1.9.1-preview on Linux In-Reply-To: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> Message-ID: <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> On Tue, Nov 11, 2008 at 1:23 PM, Mike Mondragon wrote: > I'm having problems installing Tmail using the Ruby 1.9.1-preview > release in a Linux Ubuntu Desktop > http://www.ruby-lang.org/en/news/2008/10/28/ruby-1-9-1-preview-1-released/ > Heya Mike, Haven't come across that before. I've done some limited testing on TMail in 1.9.0 but on a Mac platform, built fine there, haven't tried Linux. Due to the speed ups in Ruby 1.9 I am thinking of dropping the C Extensions all together for the 2.0 release of TMail (which is going to be written against 1.9 Ruby with the current TMail 1.x tree staying on 1.8.x Ruby) Anyway, let me know if you find a solution or need any other help. Mikel -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikemondragon at gmail.com Wed Nov 12 02:38:06 2008 From: mikemondragon at gmail.com (Mike Mondragon) Date: Tue, 11 Nov 2008 23:38:06 -0800 Subject: [Tmail-talk] problems with gem installing Tmail with Ruby 1.9.1-preview on Linux In-Reply-To: <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> Message-ID: <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> On Tue, Nov 11, 2008 at 6:18 PM, Mikel Lindsaar wrote: > On Tue, Nov 11, 2008 at 1:23 PM, Mike Mondragon > wrote: >> >> I'm having problems installing Tmail using the Ruby 1.9.1-preview >> release in a Linux Ubuntu Desktop >> http://www.ruby-lang.org/en/news/2008/10/28/ruby-1-9-1-preview-1-released/ > > Heya Mike, > Haven't come across that before. I've done some limited testing on TMail in > 1.9.0 but on a Mac platform, built fine there, haven't tried Linux. > Due to the speed ups in Ruby 1.9 I am thinking of dropping the C Extensions > all together for the 2.0 release of TMail (which is going to be written > against 1.9 Ruby with the current TMail 1.x tree staying on 1.8.x Ruby) > Anyway, let me know if you find a solution or need any other help. > Mikel > > > > _______________________________________________ > Tmail-talk mailing list > Tmail-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/tmail-talk > > It also happens for me installing Hpricot (it has C bindings). So I'm likely noob'n my 1.9 environment somehow. Thanks Mike From raasdnil at gmail.com Wed Nov 12 03:50:38 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Wed, 12 Nov 2008 19:50:38 +1100 Subject: [Tmail-talk] problems with gem installing Tmail with Ruby 1.9.1-preview on Linux In-Reply-To: <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> Message-ID: <57a815bf0811120050o65eb0294p900731eada394dd8@mail.gmail.com> > > It also happens for me installing Hpricot (it has C bindings). So I'm > likely noob'n my 1.9 environment somehow. > sounds so. Mikel -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at kikobu.com Thu Nov 13 08:11:40 2008 From: lists at kikobu.com (Morten) Date: Thu, 13 Nov 2008 14:11:40 +0100 Subject: [Tmail-talk] Dealing with duplicate attachments/parts In-Reply-To: <57a815bf0811120050o65eb0294p900731eada394dd8@mail.gmail.com> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> <57a815bf0811120050o65eb0294p900731eada394dd8@mail.gmail.com> Message-ID: <46241753-CB8F-41FE-BC3D-020A786D526F@kikobu.com> Hi, I receive emails like this: Email 1: Has a text/plain part and an image/gif part Email 2: Has a text/plain part and an image/gif attachment Email 3: Has a text/plain part and an image/gif part and an image/gif attachment This means that some files sent with the emails, appear both as a part and an attachment (case 3). I would like to support all three cases, but not read the same file twice (case 3 - as part AND attachment). My guess is, that I will need to compare file names: >> m.parts.last.header['content-type'].params['name'] => "ATT84490317.gif" >> m.attachments.last.original_filename => "ATT84490317.gif" But in this approach, the m.parts.last.header['content- type'].params['name'] section is not very robust (the content-type header could be cased like Content-Type for example). Is there a better way? Thanks, Morten From burkholp at ncbi.nlm.nih.gov Thu Nov 13 15:45:18 2008 From: burkholp at ncbi.nlm.nih.gov (Peter Burkholder) Date: Thu, 13 Nov 2008 15:45:18 -0500 Subject: [Tmail-talk] Dealing with duplicate attachments/parts In-Reply-To: <46241753-CB8F-41FE-BC3D-020A786D526F@kikobu.com> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> <57a815bf0811120050o65eb0294p900731eada394dd8@mail.gmail.com> <46241753-CB8F-41FE-BC3D-020A786D526F@kikobu.com> Message-ID: <9DD83273-16B0-46EC-ABD2-49DF35AB6057@ncbi.nlm.nih.gov> On Nov 13, 2008, at 8:11 AM, Morten wrote: > This means that some files sent with the emails, appear both as a > part and an attachment (case 3). I would like to support all three > cases, but not read the same file twice (case 3 - as part AND > attachment). My guess is, that I will need to compare file names: What mailers have you seen do this? > > >> m.parts.last.header['content-type'].params['name'] > => "ATT84490317.gif" > >> m.attachments.last.original_filename > => "ATT84490317.gif" > > But in this approach, the m.parts.last.header['content-type'].params > ['name'] section is not very robust (the content-type header could > be cased like Content-Type for example). Is there a better way? IIRC, the header hashes are case-insensitive. -Peter -- Peter Burkholder [Contractor] +1-301-402-7499 burkholp at ncbi.nlm.nih.gov Applications Administrator, NCBI/NLM/NIH -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at kikobu.com Thu Nov 13 16:05:26 2008 From: lists at kikobu.com (Morten) Date: Thu, 13 Nov 2008 22:05:26 +0100 Subject: [Tmail-talk] Dealing with duplicate attachments/parts In-Reply-To: <9DD83273-16B0-46EC-ABD2-49DF35AB6057@ncbi.nlm.nih.gov> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> <57a815bf0811120050o65eb0294p900731eada394dd8@mail.gmail.com> <46241753-CB8F-41FE-BC3D-020A786D526F@kikobu.com> <9DD83273-16B0-46EC-ABD2-49DF35AB6057@ncbi.nlm.nih.gov> Message-ID: <16DB5D62-A048-4214-BB2A-16914035A3E0@kikobu.com> On Nov 13, 2008, at 9:45 PM, Peter Burkholder wrote: > > On Nov 13, 2008, at 8:11 AM, Morten wrote: > >> This means that some files sent with the emails, appear both as a >> part and an attachment (case 3). I would like to support all three >> cases, but not read the same file twice (case 3 - as part AND >> attachment). My guess is, that I will need to compare file names: > > What mailers have you seen do this? Lotus Notes 2004 (I know...) > >> >> m.parts.last.header['content-type'].params['name'] >> => "ATT84490317.gif" >> >> m.attachments.last.original_filename >> => "ATT84490317.gif" >> >> But in this approach, the m.parts.last.header['content- >> type'].params['name'] section is not very robust (the content-type >> header could be cased like Content-Type for example). Is there a >> better way? > > IIRC, the header hashes are case-insensitive. It wasn't for the above, an also, the above approach just seems rickety in general, perhaps there's no "name" params in the content- type header, perhaps there's no disposition with the info either. I take it that sending "non text" as a part is considered bad behavior by most mail clients (we've processed hundreds of thousands of emails and not seen this before now). Br, Morten From raasdnil at gmail.com Thu Nov 13 21:21:00 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Fri, 14 Nov 2008 13:21:00 +1100 Subject: [Tmail-talk] Dealing with duplicate attachments/parts In-Reply-To: <16DB5D62-A048-4214-BB2A-16914035A3E0@kikobu.com> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> <57a815bf0811120050o65eb0294p900731eada394dd8@mail.gmail.com> <46241753-CB8F-41FE-BC3D-020A786D526F@kikobu.com> <9DD83273-16B0-46EC-ABD2-49DF35AB6057@ncbi.nlm.nih.gov> <16DB5D62-A048-4214-BB2A-16914035A3E0@kikobu.com> Message-ID: <57a815bf0811131821i7e0d61bp5b5c71f5bf0c6e2a@mail.gmail.com> On Fri, Nov 14, 2008 at 8:05 AM, Morten wrote: > On Nov 13, 2008, at 9:45 PM, Peter Burkholder wrote: > >> On Nov 13, 2008, at 8:11 AM, Morten wrote: >> >>> This means that some files sent with the emails, appear both as a part >>> and an attachment (case 3). I would like to support all three cases, but not >>> read the same file twice (case 3 - as part AND attachment). My guess is, >>> that I will need to compare file names: >>> >> What mailers have you seen do this? >> > Lotus Notes 2004 (I know...) Ouch >> m.parts.last.header['content-type'].params['name'] >>> => "ATT84490317.gif" >>> >> m.attachments.last.original_filename >>> => "ATT84490317.gif" >>> >>> But in this approach, the >>> m.parts.last.header['content-type'].params['name'] section is not very >>> robust (the content-type header could be cased like Content-Type for >>> example). Is there a better way? >>> >> >> IIRC, the header hashes are case-insensitive. > > This is correct, TMail downcases everything in the main and sub types (look at the ContentTypeHeader class in header.rb (around line 750) > It wasn't for the above, an also, the above approach just seems rickety in > general, perhaps there's no "name" params in the content-type header, > perhaps there's no disposition with the info either. I take it that sending > "non text" as a part is considered bad behavior by most mail clients (we've > processed hundreds of thousands of emails and not seen this before now). > TMail is pretty good at handling attachments and edge cases. There are a bunch of tests in test_mail for this, but all the new edge case attachment problems I am putting in test_attachments.rb. If you can find a test case which should work but doesn't, please let me know. Mikel -- http://lindsaar.net/ Rails, RSpec and Life blog.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at kikobu.com Fri Nov 14 06:22:50 2008 From: lists at kikobu.com (Morten) Date: Fri, 14 Nov 2008 12:22:50 +0100 Subject: [Tmail-talk] Dealing with duplicate attachments/parts In-Reply-To: <57a815bf0811131821i7e0d61bp5b5c71f5bf0c6e2a@mail.gmail.com> References: <967d3b9a0811101823m7bc377e0g822be31980071ac6@mail.gmail.com> <57a815bf0811111818t725ff86akfee1fc21313a45f3@mail.gmail.com> <967d3b9a0811112338n75428befie3c89c5898ba08c0@mail.gmail.com> <57a815bf0811120050o65eb0294p900731eada394dd8@mail.gmail.com> <46241753-CB8F-41FE-BC3D-020A786D526F@kikobu.com> <9DD83273-16B0-46EC-ABD2-49DF35AB6057@ncbi.nlm.nih.gov> <16DB5D62-A048-4214-BB2A-16914035A3E0@kikobu.com> <57a815bf0811131821i7e0d61bp5b5c71f5bf0c6e2a@mail.gmail.com> Message-ID: Hi, thanks for the feedback on this, much appreciated. Here's a sample of a Lotus Notes mail which uses a part instead of attachments: http://pastie.org/private/uum5zriyhysnhe851xia Here's a sample of a mail which has both parts and attachments (not Lotus notes, I confused the two, looks like some MS Exchange/OLE stuff): http://pastie.org/private/omofwgmi94dhxv4eigirg For the latter, the attachments appear both as parts and attachments, not sure if this is a TMail issue (they're only in there once) >> m.attachments.size => 3 >> m.parts.size => 4 And also, the generic headers hash is not case insensitive it seems: >> m.parts.last.header['content-type'] => # >> m.parts.last.header['Content-Type'] => nil If I use m.parts.last.content_type I get the content type fine, but I need the raw header to access the name attribute. For now, my work around is to scan for parts of specific content types (pdf, jpg, gif etc.) and check that the mail does not also have attachments. I will try and dig into the test cases for header case sensitivity, but could use some direction in the parts/attachment issue. This is TMail 1.2.3 BTW. Br, Morten On Nov 14, 2008, at 3:21 AM, Mikel Lindsaar wrote: > On Fri, Nov 14, 2008 at 8:05 AM, Morten wrote: > On Nov 13, 2008, at 9:45 PM, Peter Burkholder wrote: > On Nov 13, 2008, at 8:11 AM, Morten wrote: > This means that some files sent with the emails, appear both as a > part and an attachment (case 3). I would like to support all three > cases, but not read the same file twice (case 3 - as part AND > attachment). My guess is, that I will need to compare file names: > What mailers have you seen do this? > Lotus Notes 2004 (I know...) > > Ouch > > >> m.parts.last.header['content-type'].params['name'] > => "ATT84490317.gif" > >> m.attachments.last.original_filename > => "ATT84490317.gif" > > But in this approach, the m.parts.last.header['content- > type'].params['name'] section is not very robust (the content-type > header could be cased like Content-Type for example). Is there a > better way? > > IIRC, the header hashes are case-insensitive. > > > This is correct, TMail downcases everything in the main and sub > types (look at the ContentTypeHeader class in header.rb (around line > 750) > > It wasn't for the above, an also, the above approach just seems > rickety in general, perhaps there's no "name" params in the content- > type header, perhaps there's no disposition with the info either. I > take it that sending "non text" as a part is considered bad behavior > by most mail clients (we've processed hundreds of thousands of > emails and not seen this before now). > > TMail is pretty good at handling attachments and edge cases. > > There are a bunch of tests in test_mail for this, but all the new > edge case attachment problems I am putting in test_attachments.rb. > If you can find a test case which should work but doesn't, please > let me know. > > Mikel > > > -- > http://lindsaar.net/ > Rails, RSpec and Life blog.... > > > _______________________________________________ > Tmail-talk mailing list > Tmail-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/tmail-talk From tmail-talk at wrighty.com Mon Nov 17 06:13:34 2008 From: tmail-talk at wrighty.com (Paul Wright) Date: Mon, 17 Nov 2008 11:13:34 +0000 Subject: [Tmail-talk] TMail fails to parse bad email address in email but succeeds on TMail::Address.parse Message-ID: <282e72050811170313w3f0d20f3mbff9dbbc6e86d7d3@mail.gmail.com> Hi all, I submitted the following as a bug on RubyForge[1] but was wondering if anyone knows a workaround in the interim? We just came across this in an internal application that uses TMail to parse email. Is the following expected behaviour? #!/usr/bin/env ruby bad_address = 'Foo... ' test_email = < Subject: A Subject line Here's a mail body. Lovely. MAIL mail = TMail::Mail.parse(test_email) p mail.from p TMail::Address.parse(bad_address).to_s p TMail::Address.parse(bad_address).spec output: nil "\"Foo...\" " "foo at example.com" We're using TMail bundled inside Rails (2.1.2) and version.rb is 1.2.3 Further investigation has found that any address name ending in a period will trigger this bug. Cheers, Paul. [1] - http://rubyforge.org/tracker/index.php?func=detail&aid=22771&group_id=4512&atid=17370 From raasdnil at gmail.com Mon Nov 17 06:41:12 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Mon, 17 Nov 2008 22:41:12 +1100 Subject: [Tmail-talk] TMail fails to parse bad email address in email but succeeds on TMail::Address.parse In-Reply-To: <282e72050811170313w3f0d20f3mbff9dbbc6e86d7d3@mail.gmail.com> References: <282e72050811170313w3f0d20f3mbff9dbbc6e86d7d3@mail.gmail.com> Message-ID: <57a815bf0811170341h1f1e1665g861d3bf3ca02e722@mail.gmail.com> On Mon, Nov 17, 2008 at 10:13 PM, Paul Wright wrote: > We're using TMail bundled inside Rails (2.1.2) and version.rb is 1.2.3 > Further investigation has found that any address name ending in a > period will trigger this bug. Yes, this was a known bug. Any address name that ends in a period will fail. However, this has been fixed in the latest trunk version of TMail. You can grab it with: svn co svn+ssh://mikel at rubyforge.org/var/svn/tmail/trunk trunk And copy over the lib/tmail/address.rb file into your rails app. It should work fine. By the way, the following tests pass in Trunk: def test_dot_in_address() validate_case__address\ %Q(Minero A. ), :name => "Minero A.", :display_name => "Minero A.", :address => %Q(aamine at loveruby.net), :comments => nil, :domain => 'loveruby.net', :local => %Q(aamine), :format => %Q("me at my_place" ) validate_case__address\ %Q(mikel . ), :name => "mikel .", :display_name => "mikel .", :address => %Q(mikel at lindsaar.net), :comments => nil, :domain => 'lindsaar.net', :local => %Q(mikel), :format => %Q("mikel ." ) validate_case__address\ %Q("mikel ." ), :name => "mikel .", :display_name => "mikel .", :address => %Q(mikel at lindsaar.net), :comments => nil, :domain => 'lindsaar.net', :local => %Q(mikel), :format => %Q("mikel ." ) validate_case__address\ %Q(mikel "." ), :name => %Q(mikel .), :display_name => %Q(mikel .), :address => %Q(mikel at lindsaar.net), :comments => nil, :domain => 'lindsaar.net', :local => %Q(mikel), :format => %Q(mikel "." ) end -- http://lindsaar.net/ Rails, RSpec and Life blog.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From raasdnil at gmail.com Mon Nov 17 07:35:03 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Mon, 17 Nov 2008 23:35:03 +1100 Subject: [Tmail-talk] TMail fails to parse bad email address in email but succeeds on TMail::Address.parse In-Reply-To: <57a815bf0811170341h1f1e1665g861d3bf3ca02e722@mail.gmail.com> References: <282e72050811170313w3f0d20f3mbff9dbbc6e86d7d3@mail.gmail.com> <57a815bf0811170341h1f1e1665g861d3bf3ca02e722@mail.gmail.com> Message-ID: <57a815bf0811170435h50e2bf82h9cc1f5213a5cd86@mail.gmail.com> OK.... Hold that thought... just found a bug which will stop this working. I am fixing it now. Mikel -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott at scottmotte.com Tue Nov 18 20:34:09 2008 From: scott at scottmotte.com (Scott Motte) Date: Tue, 18 Nov 2008 17:34:09 -0800 Subject: [Tmail-talk] two instances of tmail.body (bug?) with gmail Message-ID: tmail.body shows two instances of body text (one html formatted and one plain text) when using with gmail imap see http://gist.github.com/26368 for script and output thanks. tmail seems super quick to use. -------------- next part -------------- An HTML attachment was scrubbed... URL: From raasdnil at gmail.com Fri Nov 21 07:07:01 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Fri, 21 Nov 2008 23:07:01 +1100 Subject: [Tmail-talk] TMail now on GitHub Message-ID: <57a815bf0811210407h27abe35dw3fdda3f699cfe294@mail.gmail.com> Hello all, I recently (10 minutes ago) put TMail on github. http://github.com/mikel/tmail/tree/master Feel free to join in! Mikel -- http://lindsaar.net/ Rails, RSpec and Life blog.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeljko.filipin at gmail.com Wed Nov 26 08:43:12 2008 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 26 Nov 2008 14:43:12 +0100 Subject: [Tmail-talk] received header Message-ID: Hi, I am inspecting all headers of a mail (it is attached as mail.eml): irb(main):001:0> require 'tmail' => true irb(main):002:0> mail = TMail::Mail.load "mail.eml" => # bodyport=nil> ... irb(main):021:0> mail.each_header { |header, value| puts "#{header} = #{value}" } x-originalarrivaltime = 26 Nov 2008 12:32:26.0649 (UTC) FILETIME=[0A483090:01C94FC3] message-id = reply-to = community title thread-topic = [community_url] discussion title mime-version = 1.0 x-ecs-notification = yes date = Wed, 26 Nov 2008 13:32:26 +0100 content-type = multipart/alternative; boundary=mimepart_492d4dfccc588_4e414263a42dd from = Member-1 ECS priority = normal thread-index = AclPwwpFsbP3/gTxQnW3+VbCjC3GxQ== x-receiver = Leader-1.ECS at 1.users.local subject = [community_url] discussion title to = community title received = content-class = urn:content-classes:message x-mimeole = Produced By Microsoft MimeOLE V6.00.3790.4325 importance = normal list-id = "community title" x-sender = bc3c4c3b-a0b3-47fc-a490-cfae3b0c8eb0=community_url=Leader-1.ECS=1.users.local at 1.ecs.local ... Please notice that header "received" has empty value. It is not empty in mail: Received: from mail pickup service by win2003-mac-3-trunk with Microsoft SMTPSVC; Wed, 26 Nov 2008 13:32:26 +0100 If I do value.inspect it is not empty: irb(main):024:0> mail.each_header { |header, value| puts "#{header} = #{value.inspect}" } ... to = #\n"> received = # content-class = # ... For some reason to_s returns empty string for "received" header: irb(main):025:0> mail["received"] => [#] irb(main):026:0> mail["received"].to_s => "" but to_s does not return emtpy string for other headers: irb(main):031:0> mail["content-type"] => # irb(main):033:0> mail["content-type"].to_s => "multipart/alternative; boundary=mimepart_492d4dfccc588_4e414263a42dd" Anybody has an idea what went wrong? Thanks, ?eljko Filipin -- http://zeljkofilipin.com/ http://watirpodcast.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mail.eml URL: