mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
we will use the non-compliant way for mail() until we further inspected PHP's source.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10015 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9bcc38ea0b
commit
92a1775294
1 changed files with 3 additions and 11 deletions
|
@ -1526,19 +1526,11 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
|
||||||
$headers = implode($eol, $headers);
|
$headers = implode($eol, $headers);
|
||||||
|
|
||||||
ob_start();
|
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.
|
// 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.
|
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
|
||||||
if (!$result)
|
// 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)
|
||||||
{
|
|
||||||
// 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);
|
$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
|
||||||
$err_msg = ob_get_clean();
|
$err_msg = ob_get_clean();
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue