From 6d0ada30d7847a509db10d819020ac653597d073 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 09 Aug 2011 05:46:54 -0400
Subject: [PATCH] - Fix handling of email addresses with quoted local part (#1487939)

---
 program/include/rcube_smtp.php |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/program/include/rcube_smtp.php b/program/include/rcube_smtp.php
index 120336c..73c30d2 100644
--- a/program/include/rcube_smtp.php
+++ b/program/include/rcube_smtp.php
@@ -439,14 +439,14 @@
     // if we're passed an array, assume addresses are valid and implode them before parsing.
     if (is_array($recipients))
       $recipients = implode(', ', $recipients);
-    
+
     $addresses = array();
     $recipients = rcube_explode_quoted_string(',', $recipients);
 
     reset($recipients);
     while (list($k, $recipient) = each($recipients))
     {
-      $a = explode(" ", $recipient);
+      $a = rcube_explode_quoted_string(' ', $recipient);
       while (list($k2, $word) = each($a))
       {
         if (strpos($word, "@") > 0 && $word[strlen($word)-1] != '"')
@@ -457,6 +457,7 @@
         }
       }
     }
+
     return $addresses;
   }
 

--
Gitblit v1.9.1