mikel / tmail

TMail is a Ruby Email Handler.
http://tmail.rubyforge.org/
Other
73 stars 36 forks source link

use TMail::Mail#charset when unquoting the body #2

Closed technoweenie closed 15 years ago

technoweenie commented 15 years ago

Here's a small patch for TMail: http://gist.github.com/raw/141602/3ef8b5e6c518da9fe90c032cbe58d8f1a07a6ddb/gistfile1.txt

I don't know if there's any reason to use #sub_header there, but I needed this for an ugly monkey patch I had to write. I have to process some spam emails with the charset specified in the mime-version header. I know, it's completely uncalled for, but what can I do? Here's what I'm using now:

http://gist.github.com/141603

If you think this hack is a good idea for TMail, I'll gladly work it into a patch too.

mikel commented 15 years ago

Heya, thanks for the patch.

Lets work the overall idea into a patch with a test case showing an email that does this. You can whack a test onto the end of test_header.rb with the specific example of an email, as long as it helps tmail read that email and doesn't break any other tests, should be good to go.

Mikel

technoweenie commented 15 years ago

No problem... I have a test case but it's wrapped up in astrotrain. I'll extract it and submit a proper tmail patch soon.

mikel commented 15 years ago

Did you get any where with this patch Rick?

Looking at doing another gem release soon and would like to include your work.

Mikel