|
From: Meik S. <acy...@ph...> - 2009-08-18 13:25:02
|
Author: acydburn
Date: Tue Aug 18 14:24:45 2009
New Revision: 10015
Log:
we will use the non-compliant way for mail() until we further inspected PHP's source.
Modified:
branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php
Modified: branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php Tue Aug 18 14:24:45 2009
***************
*** 1526,1544 ****
$headers = implode($eol, $headers);
ob_start();
- $result = $config['email_function_name']($to, mail_encode($subject, $eol), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
- $err_msg = ob_get_clean();
-
- // Try again...
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
! if (!$result)
! {
! // Use nothing as delimiter (results in SPACE used)
! ob_start();
! $result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
! $err_msg = ob_get_clean();
! }
return $result;
}
--- 1526,1536 ----
$headers = implode($eol, $headers);
ob_start();
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
! // Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
! $result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
! $err_msg = ob_get_clean();
return $result;
}
|