diff options
author | Guy Brand <gb@isis.u-strasbg.fr> | 2007-02-15 19:46:09 +0100 |
---|---|---|
committer | Guy Brand <gb@isis.u-strasbg.fr> | 2007-02-15 19:46:09 +0100 |
commit | 265f02e38151badf5d9f910799ff9df58f2f50d3 (patch) | |
tree | 8fdc634901d6c5a4fb16d8e0ef072a21bf583c87 | |
parent | 76d47b3468a4428233013a087c054b2115ace74c (diff) | |
download | rpg-265f02e38151badf5d9f910799ff9df58f2f50d3.tar.gz rpg-265f02e38151badf5d9f910799ff9df58f2f50d3.tar.bz2 |
RFC2047 fix for mail subjects (FS #1080)
Patch by Per Foreby
darcs-hash:20070215184609-19e2d-a5361f5009df14a3c21729758e758fe4ee2d1117.gz
-rw-r--r-- | inc/mail.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/mail.php b/inc/mail.php index 02434cf3c..a31385914 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -39,8 +39,11 @@ function mail_send($to, $subject, $body, $from='', $cc='', $bcc='', $headers=nul $subject = utf8_strip($subject); } - if(!utf8_isASCII($subject)) + if(!utf8_isASCII($subject)) { $subject = '=?UTF-8?Q?'.mail_quotedprintable_encode($subject,0).'?='; + // Spaces must be encoded according to rfc2047. Use the "_" shorthand + $subject = preg_replace('/ /', '_', $subject); + } $header = ''; |