[Svn] r2370 - in trunk/roundcubemail: . program/steps/mail

trac at roundcube.net trac at roundcube.net
Tue Mar 31 16:47:37 CEST 2009


Author: alec
Date: 2009-03-31 09:47:22 -0500 (Tue, 31 Mar 2009)
New Revision: 2370

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/steps/mail/func.inc
Log:
- Fix using mail() on Windows (#1485779)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-03-31 12:27:07 UTC (rev 2369)
+++ trunk/roundcubemail/CHANGELOG	2009-03-31 14:47:22 UTC (rev 2370)
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix using mail() on Windows (#1485779)
 - Fix word wrapping in message-part's <PRE>s for printing (#1485787)
 - Fix incorrect word wrapping in outgoing plaintext multibyte messages (#1485714)
 - Fix double footer in HTML message with embedded images

Modified: trunk/roundcubemail/program/steps/mail/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/func.inc	2009-03-31 12:27:07 UTC (rev 2369)
+++ trunk/roundcubemail/program/steps/mail/func.inc	2009-03-31 14:47:22 UTC (rev 2370)
@@ -1308,7 +1308,14 @@
     // reset stored headers and overwrite
     $message->_headers = array();
     $header_str = $message->txtHeaders($headers_php);
-  
+    
+    // #1485779
+    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+      if (preg_match_all('/<([^@]+@[^>]+)>/', $headers_enc['To'], $m)) {
+        $headers_enc['To'] = implode(', ', $m[1]);
+        }
+      }
+       
     if (ini_get('safe_mode'))
       $sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str);
     else

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list