aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_messenger.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-11-12 18:44:42 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-11-12 18:44:42 +0000
commit85ddd3ea84a405816ea2e64be9001c7f470999ad (patch)
tree426424c44c8100cb6d1265e9bf72e51aa1df2749 /phpBB/includes/functions_messenger.php
parentadea08faef87397733f603eb9d3071876d8abec7 (diff)
downloadforums-85ddd3ea84a405816ea2e64be9001c7f470999ad.tar
forums-85ddd3ea84a405816ea2e64be9001c7f470999ad.tar.gz
forums-85ddd3ea84a405816ea2e64be9001c7f470999ad.tar.bz2
forums-85ddd3ea84a405816ea2e64be9001c7f470999ad.tar.xz
forums-85ddd3ea84a405816ea2e64be9001c7f470999ad.zip
ok, this should work now for mail() and smtpmail. We also removed the newline from the spacer for mail_encode due to php's mail() function choking up on subjects with newlines.
git-svn-id: file:///svn/phpbb/trunk@6574 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r--phpBB/includes/functions_messenger.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 80a5f939f6..75eda9b10c 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -309,12 +309,15 @@ class messenger
$headers[] = 'X-MimeOLE: phpBB3';
$headers[] = 'X-phpBB-Origin: phpbb://' . str_replace(array('http://', 'https://'), array('', ''), generate_board_url());
+ // We use \n here instead of \r\n because our smtp mailer is adjusting it to \r\n automatically, whereby the php mail function only works
+ // if using \n.
+
if (sizeof($this->extra_headers))
{
- $headers[] = implode("\r\n", $this->extra_headers);
+ $headers[] = implode("\n", $this->extra_headers);
}
- return implode("\r\n", $headers);
+ return implode("\n", $headers);
}
/**
@@ -752,7 +755,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
{
if (is_array($headers))
{
- $headers = (sizeof($headers) > 1) ? join("\r\n", $headers) : $headers[0];
+ $headers = (sizeof($headers) > 1) ? join("\n", $headers) : $headers[0];
}
$headers = chop($headers);
@@ -1379,9 +1382,7 @@ function mail_encode($str)
// define start delimimter, end delimiter and spacer
$end = '?=';
$start = '=?UTF-8?B?';
-
- // It may sound strange, but within my tests using \n instead of \r\n seem to work better
- $spacer = "$end\n $start";
+ $spacer = "$end $start";
// determine length of encoded text within chunks and ensure length is even
$length = 76 - strlen($start) - strlen($end);