From e04f0bb78575c950f5a845750e783e5d5e301496 Mon Sep 17 00:00:00 2001
From: Tero Tilus <tero@tilus.net>
Date: Thu, 26 Nov 2009 15:00:17 +0200
Subject: [PATCH] RFC 2047 decode attachment file names

Signed-off-by: Tero Tilus <tero@tilus.net>
---
 lib/sup/message.rb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index 06a3c43..73896b1 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -494,6 +494,8 @@ private
 
       ## if there's a filename, we'll treat it as an attachment.
       if filename
+        ## filename could be 2047 encoded
+        filename = Rfc2047.decode_to $encoding, filename
         # add this to the attachments list if its not a generated html
         # attachment (should we allow images with generated names?).
         # Lowercase the filename because searches are easier that way 
-- 
1.5.6.5

