From 5140c310645b1728f59e27d8f5fe37aeb2928d6f Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 24 Jan 2014 06:36:48 -0500
Subject: [PATCH] Remove quotes around addressee name in case they are encoded.

---
 program/lib/Roundcube/rcube_mime.php |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index a931c27..55b70f6 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -378,6 +378,10 @@
                 }
                 if ($decode) {
                     $name = self::decode_header($name, $fallback);
+                    // some clients encode addressee name with quotes around it
+                    if ($name[0] == '"' && $name[strlen($name)-1] == '"') {
+                        $name = substr($name, 1, -1);
+                    }
                 }
             }
 

--
Gitblit v1.9.1