From raasdnil at gmail.com Sat Mar 1 18:43:11 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Sun, 2 Mar 2008 10:43:11 +1100 Subject: [Tmail-talk] TMail preamble usage In-Reply-To: <89bd8880803010450m7d2f57dah60e40c7de73a9d49@mail.gmail.com> References: <89bd8880802290154i2ede0316s915a1217646ce82d@mail.gmail.com> <57a815bf0802290602q4de318d3h392119057a90d919@mail.gmail.com> <89bd8880803010450m7d2f57dah60e40c7de73a9d49@mail.gmail.com> Message-ID: <57a815bf0803011543n1e815404g683dd1358a169e82@mail.gmail.com> On Sat, Mar 1, 2008 at 11:50 PM, charles wrote: > Anyway, I've put up 2 patches on rubyforge. One is just a misc 1.9 fix, and > the other fixes preambles. Let me know if anything needs changing. Thanks Charles, looks good. Applied both of them to trunk, now at revision 233. Mikel From raasdnil at gmail.com Sat Mar 1 18:44:09 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Sun, 2 Mar 2008 10:44:09 +1100 Subject: [Tmail-talk] Version 1.2.2 Pre-Release Message-ID: <57a815bf0803011544nd0db569m6869600c1c1b4f9e@mail.gmail.com> Hello all, I am about to roll out 1.2.2 which is a few bug fixes and a fair bit of documentation cleanup. Trunk (revision 233) is about what 1.2.2 is going to be, is there anything else really wanted in 1.2.2 ? Mikel From chris at grubbybaby.com Sat Mar 1 20:32:01 2008 From: chris at grubbybaby.com (Chris Powell) Date: Sat, 1 Mar 2008 17:32:01 -0800 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) Message-ID: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> Hi, everyone. I'm struggling to cryptographically sign an email-with- attachments. I made a little visual aid: http://web.mac.com/videophile/signed.png RFC 3156 (PGP/MIME) says that when you PGP-sign a message, you sign everything, attachments too. In my visual aid, the blue shaded area (yes, that whole area) is the "signed" portion. Any alteration of that area renders the signature invalid. It's possible to prepare and assemble the "blue section" as a string, and then generate the PGP signature and tack it on with its own MIME headers. But when I do "mail=TMail::Mail.parse(string_version)", TMail alters all my MIME boundaries to its own internally-generated ones. This poses something of a problem, as this invalidates the PGP signature; the bytes have been altered. The challenge boils down to something very, very simple: is there a way to get TMail to just 'trust me' and accept my fully-formed body- data and headers without altering them at parse-time? That way I could just hand-assemble an exact string form of the message, then TMail-ify it and send. I'm grateful for any thoughts...I sure can't find any reference of prior art on this one. Regards, Chris P. -- Chris Powell "Exit, pursued by a bear." chris at grubbybaby.com - Shakespeare, "The Winter's Tale" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/tmail-talk/attachments/20080301/05a68492/attachment.html From raasdnil at gmail.com Sat Mar 1 22:47:37 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Sun, 2 Mar 2008 14:47:37 +1100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> Message-ID: <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> On Sun, Mar 2, 2008 at 12:32 PM, Chris Powell wrote: > The challenge boils down to something very, very simple: is there a way to > get TMail to just 'trust me' and accept my fully-formed body-data and > headers without altering them at parse-time? That way I could just > hand-assemble an exact string form of the message, then TMail-ify it and > send. TMail definitely clobbers every mimepart boundary, not quite sure if this is a feature or error ;) We could make it only create a new boundary if the existing boundary does not exist... something like a switch on: mail.rb:line 190 or so unless @header['content-type'].params['boundary'] bound = ::TMail.new_boundary end The above is really pseudo code as that would break, but that would be the gist of it. Any of the email experts on the list see any problem with that? I can only think if you are replying to an email that is multipart, that might break things as you could end up with the same mime boundary, potentially... or forwarding an email.... you might end up with two boundaries in the email, one set of real ones, and ones that are quoted, but as these wouldn't match /^--.*$/ it shouldn't not be a problem for the parser. Ideas list? Mikel From maarten at solovirtuoso.com Mon Mar 3 03:51:36 2008 From: maarten at solovirtuoso.com (Maarten Oelering) Date: Mon, 3 Mar 2008 09:51:36 +0100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> Message-ID: I understand the message is composed in two phases, first the original content, here a multipart/mixed, is created. Then the original message is wrapped in a multipart/signed. In the second phase, the original content should be added to the final message as-is, i.e. transparent, i.e. without modification. Not even the mime headers of the wrapped multipart/mixed are allowed to change. I think this will be difficult, since TMail will at least want to interpret the mime headers and even if the boundary is not changed, it may change little things like header line wrapping or indentation characters. Did you also consider S/MIME for signing emails? I think S/MIME is more widely accepted than PGP. Maarten Oelering On 2-mrt-2008, at 4:47, Mikel Lindsaar wrote: > On Sun, Mar 2, 2008 at 12:32 PM, Chris Powell > wrote: >> The challenge boils down to something very, very simple: is there >> a way to >> get TMail to just 'trust me' and accept my fully-formed body-data and >> headers without altering them at parse-time? That way I could just >> hand-assemble an exact string form of the message, then TMail-ify >> it and >> send. > > TMail definitely clobbers every mimepart boundary, not quite sure if > this is a feature or error ;) > > We could make it only create a new boundary if the existing boundary > does not exist... something like a switch on: > > mail.rb:line 190 or so > > unless @header['content-type'].params['boundary'] > bound = ::TMail.new_boundary > end > > The above is really pseudo code as that would break, but that would be > the gist of it. > > Any of the email experts on the list see any problem with that? > > I can only think if you are replying to an email that is multipart, > that might break things as you could end up with the same mime > boundary, potentially... or forwarding an email.... you might end up > with two boundaries in the email, one set of real ones, and ones that > are quoted, but as these wouldn't match /^--.*$/ it shouldn't not be a > problem for the parser. > > Ideas list? > > Mikel > _______________________________________________ > Tmail-talk mailing list > Tmail-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/tmail-talk From mmmurf at gmail.com Mon Mar 3 13:00:04 2008 From: mmmurf at gmail.com (Matt Murphy) Date: Mon, 3 Mar 2008 10:00:04 -0800 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> Message-ID: It may be heresy to mention this on this particular list, but I had the issue with the mime headers being regenerated when I implemented DKIM signing, and I just ended up using rmail to do it, though I use tmail for the rest of the app's mail handling. Not an ideal solution but easy to implement if you don't mind using two mail libraries... :) On Mon, Mar 3, 2008 at 12:51 AM, Maarten Oelering wrote: > I understand the message is composed in two phases, first the > original content, here a multipart/mixed, is created. Then the > original message is wrapped in a multipart/signed. > > In the second phase, the original content should be added to the > final message as-is, i.e. transparent, i.e. without modification. Not > even the mime headers of the wrapped multipart/mixed are allowed to > change. I think this will be difficult, since TMail will at least > want to interpret the mime headers and even if the boundary is not > changed, it may change little things like header line wrapping or > indentation characters. > > Did you also consider S/MIME for signing emails? I think S/MIME is > more widely accepted than PGP. > > Maarten Oelering > > On 2-mrt-2008, at 4:47, Mikel Lindsaar wrote: > > > On Sun, Mar 2, 2008 at 12:32 PM, Chris Powell > > wrote: > >> The challenge boils down to something very, very simple: is there > >> a way to > >> get TMail to just 'trust me' and accept my fully-formed body-data and > >> headers without altering them at parse-time? That way I could just > >> hand-assemble an exact string form of the message, then TMail-ify > >> it and > >> send. > > > > TMail definitely clobbers every mimepart boundary, not quite sure if > > this is a feature or error ;) > > > > We could make it only create a new boundary if the existing boundary > > does not exist... something like a switch on: > > > > mail.rb:line 190 or so > > > > unless @header['content-type'].params['boundary'] > > bound = ::TMail.new_boundary > > end > > > > The above is really pseudo code as that would break, but that would be > > the gist of it. > > > > Any of the email experts on the list see any problem with that? > > > > I can only think if you are replying to an email that is multipart, > > that might break things as you could end up with the same mime > > boundary, potentially... or forwarding an email.... you might end up > > with two boundaries in the email, one set of real ones, and ones that > > are quoted, but as these wouldn't match /^--.*$/ it shouldn't not be a > > problem for the parser. > > > > Ideas list? > > > > Mikel > > _______________________________________________ > > Tmail-talk mailing list > > Tmail-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/tmail-talk > > _______________________________________________ > 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/20080303/48f8ba57/attachment.html From raasdnil at gmail.com Mon Mar 3 20:39:21 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Tue, 4 Mar 2008 12:39:21 +1100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> Message-ID: <57a815bf0803031739j1bf1549ep89da04c0c01dc829@mail.gmail.com> On Tue, Mar 4, 2008 at 5:00 AM, Matt Murphy wrote: > It may be heresy to mention this on this particular list, ... > implement if you don't mind using two mail libraries... :) Nyah, whatever works is good :) Though I am thinking that figuring out how to encapsulate something without touching the boundaries would be a good idea. Can anyone think of a problem that would come up if I made TMail not generate a new boundary if one already exists? That way if you did a mail.boundary = blahstring then it would use that instead of re-generating a random string for you. Doesn't look that hard to implement and I can't think of a case that would break because of it. Mikel From raasdnil at gmail.com Mon Mar 3 21:09:35 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Tue, 4 Mar 2008 13:09:35 +1100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> Message-ID: <57a815bf0803031809s6e2a2d19y88355d3c01060712@mail.gmail.com> > I'm grateful for any thoughts...I sure can't find any reference of prior art > on this one. I was just playing around and I think this should handle it: Try the following: irb > require 'tmail' > mail = TMail::Mail.new > mail.body = your_body_text_string_with_custom_boundaries > mail['Mime-Version'] = "1.0" > mail['content-type'] = 'multipart/mixed; boundary=--your-secret-boundary' > puts mail.encoded Does that solve it for you? Mikel From maarten at solovirtuoso.com Tue Mar 4 02:21:46 2008 From: maarten at solovirtuoso.com (Maarten Oelering) Date: Tue, 4 Mar 2008 08:21:46 +0100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> Message-ID: <81731CEE-5A85-487B-A0D3-387AF67C11F4@solovirtuoso.com> Hi Matt, Glad you wanted to share that with us. I am very interested in your ruby based DKIM solution. I also want to implement DomainKeys and DKIM in Ruby. Is you solution proprietary or open source? I also started off with RubyMail, since it was more flexible and simpler than Tmail. However, it also has a number of drawbacks and shortcomings. I even considered writing a my own email library, which would be flexible and transparent suiting more advanced email applications. I have done this before in Java, before JavaMail was good enough to be used in serious email applications. Because I have little time to spare I decided to go for TMail and help it where and when I can. However I must say that most of the code is acacadabra to me. Maarten Oelering On 3-mrt-2008, at 19:00, Matt Murphy wrote: > It may be heresy to mention this on this particular list, but I had > the issue with the mime headers being regenerated when I > implemented DKIM signing, and I just ended up using rmail to do it, > though I use tmail for the rest of the app's mail handling. Not an > ideal solution but easy to implement if you don't mind using two > mail libraries... :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/tmail-talk/attachments/20080304/664dca64/attachment-0001.html From raasdnil at gmail.com Tue Mar 4 02:38:38 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Tue, 4 Mar 2008 18:38:38 +1100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: <81731CEE-5A85-487B-A0D3-387AF67C11F4@solovirtuoso.com> References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> <81731CEE-5A85-487B-A0D3-387AF67C11F4@solovirtuoso.com> Message-ID: <57a815bf0803032338l6cd620ccq27c0a483514649f2@mail.gmail.com> On Tue, Mar 4, 2008 at 6:21 PM, Maarten Oelering wrote: > applications. Because I have little time to spare I decided to go for TMail > and help it where and when I can. However I must say that most of the code > is acacadabra to me. Part of the problem is the total lack of comments and the parse engine. I have been working on improving this, but I think that would be almost the most valuable thing right now is to get this finished off. Adding some basic docs to it would help it a lot. I look through the code and it looks like Minero created it with a grand master plan that didn't get finished, some of the stuff is a bit overly complex and could do with simplification. Maarten, did you write your own parser engine on the Java version? Mikel From maarten at solovirtuoso.com Tue Mar 4 07:06:02 2008 From: maarten at solovirtuoso.com (Maarten Oelering) Date: Tue, 4 Mar 2008 13:06:02 +0100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: <57a815bf0803032338l6cd620ccq27c0a483514649f2@mail.gmail.com> References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> <81731CEE-5A85-487B-A0D3-387AF67C11F4@solovirtuoso.com> <57a815bf0803032338l6cd620ccq27c0a483514649f2@mail.gmail.com> Message-ID: Hi Mikel, You are right. And you deserve all the credits, doing the dirty work of cleaning up and documenting the code. Yes, I did write my own parser which could also do the reverse, generating emails, but it was part of commercial software. For me the yaml parser and the "strategy" stuff (i don't know what it does) is what makes the tmail code so obscure. You approach of first understanding, documenting and cleaning up is I think a very good approach. Often programmers start refactoring before they completely understand the code, breaking things that previously worked, and underestimating the effort it takes to implement 100% working code. Maarten On 4-mrt-2008, at 8:38, Mikel Lindsaar wrote: > > Part of the problem is the total lack of comments and the parse > engine. > > I have been working on improving this, but I think that would be > almost the most valuable thing right now is to get this finished off. > Adding some basic docs to it would help it a lot. > > I look through the code and it looks like Minero created it with a > grand master plan that didn't get finished, some of the stuff is a bit > overly complex and could do with simplification. > > Maarten, did you write your own parser engine on the Java version? > From raasdnil at gmail.com Tue Mar 4 08:59:57 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Wed, 5 Mar 2008 00:59:57 +1100 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803011947l6d863179pace129a24876c439@mail.gmail.com> <81731CEE-5A85-487B-A0D3-387AF67C11F4@solovirtuoso.com> <57a815bf0803032338l6cd620ccq27c0a483514649f2@mail.gmail.com> Message-ID: <57a815bf0803040559v12216a38l5b56203bba0a94f4@mail.gmail.com> On Tue, Mar 4, 2008 at 11:06 PM, Maarten Oelering wrote: > You are right. And you deserve all the credits, doing the dirty work > of cleaning up and documenting the code. Thanks :) > Yes, I did write my own parser which could also do the reverse, > generating emails, but it was part of commercial software. Dang :) > For me the yaml parser and the "strategy" stuff (i don't know what it > does) is what makes the tmail code so obscure. You approach of first Same here... that RACC parser is enough to drive you nuts. As for the strategy interface, I _really_ don't get it either. I can follow the code path now that I have stepped through it enough times and understand _how_ it works, but not _why_ he chose _that_ method of doing it... I see the new Ruby Parse Tree stuff... it has some nice documentation and seems cleaner than RACC, I am thinking of going down that path, but I know effectively zero about that sort of thing (I can read it and see how it works, but never played seriously with it). That might be an option. Anyway, idle thoughts... I think the first thing I want to do after the documentation is to move all the publically accessible class and instance methods into their own file, right now they are sprinkled through the code, TMail::Mail class for example is in about 8 files in total. There is something to be said for the Java abstraction of the interface :) Then, once complete, go back through and hack into the parser engine... would like your help on that one Maarten :) Mikel From chris at grubbybaby.com Wed Mar 5 00:38:31 2008 From: chris at grubbybaby.com (Chris Powell) Date: Tue, 4 Mar 2008 21:38:31 -0800 Subject: [Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156) In-Reply-To: <57a815bf0803031809s6e2a2d19y88355d3c01060712@mail.gmail.com> References: <414E972F-1C76-4230-AE4B-A6C0894780BD@grubbybaby.com> <57a815bf0803031809s6e2a2d19y88355d3c01060712@mail.gmail.com> Message-ID: Thank you all for the enthusiastic response and several excellent suggestions. I will have to go back and experiment with them. To solve my immediate problem I ended up taking the simplest approach possible: I retained ActionMailer/TMail for the bulk of my mail duties, but I dropped down into Net::SMTP for this one particular task. I carefully assembled a header/body combo exactly the way I wanted it, and then pushed it off to the SMTP server. Regards, Chris -- Chris Powell "Exit, pursued by a bear." chris at grubbybaby.com - Shakespeare, "The Winter's Tale" On Mar 3, 2008, at 6:09 PM, Mikel Lindsaar wrote: >> I'm grateful for any thoughts...I sure can't find any reference of >> prior art >> on this one. > > I was just playing around and I think this should handle it: > > Try the following: > > irb >> require 'tmail' >> mail = TMail::Mail.new >> mail.body = your_body_text_string_with_custom_boundaries >> mail['Mime-Version'] = "1.0" >> mail['content-type'] = 'multipart/mixed; boundary=--your-secret- >> boundary' >> puts mail.encoded > > Does that solve it for you? > > Mikel > _______________________________________________ > 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/20080304/0ae2ec6a/attachment.html From raasdnil at gmail.com Sat Mar 8 19:22:08 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Sun, 9 Mar 2008 11:22:08 +1100 Subject: [Tmail-talk] [ANN] TMail 1.2.2 - Ruby 1.9 Compatible & Documentation Message-ID: <57a815bf0803081622x3432f94aje05d01f30ab606f@mail.gmail.com> TMail - Mail Handling Library for Ruby ================================= TMail is the Ruby Mail handler used in the Ruby on Rails and Nitro web frame works as well as many others (now including, the Ruby Talk mail gateway!). TMail is now a gem. You can install it on any platform via: # gem install tmail Alternatively you can download the source code or view extra documentation at the website: http://tmail.rubyforge.org/ Release Summary: ------------------ TMail 1.2.2 is now compatible with Ruby 1.9 - all tests pass for both Ruby 1.9 and Ruby 1.8.6. Please test and report back any errors. 1.2.2 also brings DOCUMENTATION (yes, in capitals) revamped README, and simplified documentation means that now you can fire up your Gem server and view the TMail RDocs without having the schedule a 3 hour break from your work to try and decipher them. I have done a lot of documentation (several thousand lines in total) however there is a more to go and I would like any contributions out there :) You can also now view the RDocs online at http://tmail.rubyforge.org/rdoc/ Also created a Contributing to TMail page at http://tmail.rubyforge.org/contributing/ for those of you who want to help but are not sure how. Rails 2.0 now has a feature where it will use the gem version of TMail if it detects a higher version than 1.2.1. So anyone on Rails 2.0 can upgrade to TMail 1.2.2 by simply doing gem install tmail and then restarting their server. Rails Edge will have the final TMail 1.2.2 changes merged in in the next few days. Nitro users can simple gem install tmail to get the upgrade. Additionally, several bugs were fixed from the tracker (see details below) One set of API changes: base64_encode and base64_decode have been renamed to base64_encode! and base64_decode! as they were destructive on the receiver. base64_encode and base64_decode have been created to be non-destructive on the receiver. Other than the API change, TMail should be API compatible with TMail 1.2.0 Release Update Details: ------------------------- * Closed #18516 - Fix TMail::Mail#preamble, and add #preamble= (Charles Lowe) * Closed #18515 - Removed ftools from test case (Charles Lowe) * A _LOT_ more documentation to the main tmail classes (Mikel) * Closed #18038 - Multiple froms not being parsed correctly, added a test case to cover this and show the correct handling - (Mikel) * Closed #17719 - Reading unix mailbox fails using File.truncate - (Mikel) * Updated documentation for UNIXMbox.new (Mikel) * Added another test case from ActionMailer into test_quote.rb (Mikel) * Closed #17011-107004: 1.9 Compatibility bugs (Kornelius Kalnbach & Mikel) * Closed #17044 - Fixed Minero's TODO: "allow this type of header: "Minero A. " (Mikel) * Closed #17045 - Fixed the Address class to pre quote the email address 'mikel at me.com ' into '"mikel at me.com" ' which handles this problem (Mikel) See the changelog for previous changes. Bug Reports / Fixes: ---------------------- As always, we really welcome any bug reports or code for patches you have created. Please submit anything you find through our RubyForge tracker project which you can get to from our website: http://tmail.rubyforge.org/ We hope you enjoy this release! Mikel & The Growing TMail Team From adrian.lewis at artsalliancemedia.com Mon Mar 10 05:34:07 2008 From: adrian.lewis at artsalliancemedia.com (Adrian Lewis) Date: Mon, 10 Mar 2008 09:34:07 -0000 Subject: [Tmail-talk] TMail example Message-ID: <49A0DBD9577C0A4096A969872C94980A03F38346@aam-ex-1.aam.local> Hi, Could anyone give me a TMail example of either reading an unread message body from gmail or hotmail please? Thanks You Aidy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/tmail-talk/attachments/20080310/b0ae657d/attachment.html From adrian.lewis at artsalliancemedia.com Mon Mar 10 05:54:26 2008 From: adrian.lewis at artsalliancemedia.com (Adrian Lewis) Date: Mon, 10 Mar 2008 09:54:26 -0000 Subject: [Tmail-talk] TMail example Message-ID: <49A0DBD9577C0A4096A969872C94980A03F38363@aam-ex-1.aam.local> Hi, Could anyone give me a TMail example of either reading an unread message body from gmail or hotmail please? Thank You Aidy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/tmail-talk/attachments/20080310/38e2ad00/attachment-0001.html From maggelet at gmail.com Mon Mar 24 13:48:54 2008 From: maggelet at gmail.com (Mark Maggelet) Date: Mon, 24 Mar 2008 09:48:54 -0800 Subject: [Tmail-talk] processing bounces Message-ID: <2127a07b0803241048t22422cd8o8990be1a0e8d956c@mail.gmail.com> Hi Guys, I'm trying to use tmail to process bounced emails. I need to check the subject line for 'failure notice' and then get the intended recipients email out of the body and do something with it. Does anybody have something they can share to get me started? Thanks, - Mark From raasdnil at gmail.com Tue Mar 25 01:55:43 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Tue, 25 Mar 2008 16:55:43 +1100 Subject: [Tmail-talk] processing bounces In-Reply-To: <2127a07b0803241048t22422cd8o8990be1a0e8d956c@mail.gmail.com> References: <2127a07b0803241048t22422cd8o8990be1a0e8d956c@mail.gmail.com> Message-ID: <57a815bf0803242255j6ced1c65g80a237954bace883@mail.gmail.com> On Tue, Mar 25, 2008 at 4:48 AM, Mark Maggelet wrote: > I'm trying to use tmail to process bounced emails. I need to check the > subject line for 'failure notice' and then get the intended recipients > email out of the body and do something with it. > Does anybody have something they can share to get me started? I sent my reply to Mark directly, by mistake, instead of to the list. In any case, I wrote up one way how to handle it here: http://lindsaar.net/2008/3/25/handling-bounced-email-with-ruby-and-tmail I am thinking of making this a feature of TMail actually... if mail.content-type == 'multipart-report' mail.report.status end #=> '5.0.0' Or something... Regards Mikel From raasdnil at gmail.com Tue Mar 25 02:40:56 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Tue, 25 Mar 2008 17:40:56 +1100 Subject: [Tmail-talk] Default reply set to list Message-ID: <57a815bf0803242340p2e5d5633kcc7cbad5180a267f@mail.gmail.com> Hello all, Just a heads up, I changed the default reply to be the mailing list. So if you want to reply privately to a poster, you have to change that. Mikel From niklaus.giger at member.fsf.org Mon Mar 31 02:01:43 2008 From: niklaus.giger at member.fsf.org (Niklaus Giger) Date: Mon, 31 Mar 2008 08:01:43 +0200 Subject: [Tmail-talk] Errors migrating to tmail 1.2.1 (from << 0.11) Message-ID: <200803310801.44176.niklaus.giger@member.fsf.org> Hi I used tmail with much success in a small utility at the enterprise where I work. Thanks a lot for this nice library! I wrote it more than two years ago. As our server will be migrated I have to switch to newer version of ruby and tmail. Almost all my unit tests passed once I did a few cleanups like - msgid -> message_id - from_addresses -> from_addrs I however failed to create test messages where I before did things like mail.parts[0] = I tried various things but could not figure out the correct way to setup a multiple part for a test message, where I have a) a part with some text b) one or more attachements (e.g. zip files) I would appreciate if somebody could outline me how to do this. Best regards and thanks in advance. Niklaus -- Niklaus Giger Wieshoschet 6 CH-8753 Mollis Tel. ++41 55 612 20 54 (privat) Tel. ++41 55 618 64 68 (Gesch?ft) From raasdnil at gmail.com Mon Mar 31 05:52:06 2008 From: raasdnil at gmail.com (Mikel Lindsaar) Date: Mon, 31 Mar 2008 20:52:06 +1100 Subject: [Tmail-talk] Errors migrating to tmail 1.2.1 (from << 0.11) In-Reply-To: <200803310801.44176.niklaus.giger@member.fsf.org> References: <200803310801.44176.niklaus.giger@member.fsf.org> Message-ID: <57a815bf0803310252q4e7c5a54o335f7216afff78f4@mail.gmail.com> On Mon, Mar 31, 2008 at 5:01 PM, Niklaus Giger wrote: > I used tmail with much success in a small utility at the enterprise where I work. > Thanks a lot for this nice library! You are very welcome > I however failed to create test messages where I before did things like > mail.parts[0] = The simple way is just make a new tmail object set it's body etc and then add that to the parts array.. Here is an irb transcript of the process: irb(main):001:0> require 'tmail' => true irb(main):003:0* mail = TMail::Mail.new => # bodyport=nil> irb(main):002:0> mail.to = 'mikel at me.com' => "mikel at me.com" irb(main):004:0> part1 = TMail::Mail.new => # bodyport=nil> irb(main):005:0> part1.body = "This is a plain text part" => "This is a plain text part" irb(main):006:0> part1.content_type = 'text/plain' => "text/plain" irb(main):007:0> part1.to_s => "Content-Type: text/plain\n\nThis is a plain text part" irb(main):008:0> mail.parts[0] = part1 => # bodyport=#> irb(main):009:0> puts mail.encoded To: mikel at me.com Content-Type: multipart/mixed; boundary=mimepart_47f0b415efcf7_1b9fbb8036f --mimepart_47f0b415efcf7_1b9fbb8036f Content-Type: text/plain This is a plain text part --mimepart_47f0b415efcf7_1b9fbb8036f-- => nil