Explorar el Código

fix for personal names with "," inside it. This will fix wrong address
parsing in case of replyall

stekkel hace 22 años
padre
commit
e87d7bc0af
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      src/compose.php

+ 5 - 0
src/compose.php

@@ -128,6 +128,11 @@ function replyAllString($header) {
    $url_replytoallcc = '';
    foreach( $url_replytoall_ar as $email => $personal) {
       if ($personal) {
+         // if personal name contains address separator then surround
+         // the personal name with double quotes.
+         if (strpos($personal,',') !== false) {
+             $personal = '"'.$personal.'"';
+         }
          $url_replytoallcc .= ", $personal <$email>";
       } else {
          $url_replytoallcc .= ', '. $email;