Przeglądaj źródła

Fixed bug with 8-bit characters in personal name when sending mail.

gustavf 25 lat temu
rodzic
commit
f22ef95d0b
1 zmienionych plików z 3 dodań i 5 usunięć
  1. 3 5
      functions/smtp.php

+ 3 - 5
functions/smtp.php

@@ -130,14 +130,12 @@
          $cc_list = getLineOfAddrs($cc);
          $bcc_list = getLineOfAddrs($bcc);
          
+         /* Encoding 8-bit characters and making from line */
+         $subject = encodeHeader($subject);
          if ($from == "")
             $from = "<$from_addr>";
          else
-            $from = $from . " <$from_addr>";
-
-         /* Encoding 8-bit characters */
-         $subject = encodeHeader($subject);
-         $from = encodeHeader($from);
+            $from = encodeHeader($from) . " <$from_addr>";
          
          /* This creates an RFC 822 date */
          $date = date("D, j M Y H:i:s ", mktime()) . timezone();