aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-07-20 17:55:36 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-07-20 17:55:36 +0000
commitb4d834ed09182b152cdf94c524e06ef5fed094c1 (patch)
tree47138961803b91582e4b59f87a1d3d6e63cfd9e7 /phpBB/includes
parent1984ab5af5f71fe99508efeb4467ebddd3ffbfab (diff)
downloadforums-b4d834ed09182b152cdf94c524e06ef5fed094c1.tar
forums-b4d834ed09182b152cdf94c524e06ef5fed094c1.tar.gz
forums-b4d834ed09182b152cdf94c524e06ef5fed094c1.tar.bz2
forums-b4d834ed09182b152cdf94c524e06ef5fed094c1.tar.xz
forums-b4d834ed09182b152cdf94c524e06ef5fed094c1.zip
revert a change i made (we already adjust line endings to be rfc-compliant and use \n for the php mail function as suggested by the manual)
git-svn-id: file:///svn/phpbb/trunk@6193 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_messenger.php43
1 files changed, 25 insertions, 18 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 21edb9fd13..052f372443 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -118,7 +118,7 @@ class messenger
*/
function headers($headers)
{
- $this->extra_headers .= trim($headers) . "\r\n";
+ $this->extra_headers .= trim($headers) . "\n";
}
/**
@@ -339,22 +339,22 @@ class messenger
}
// Build header
- $headers = 'From: ' . $this->from . "\r\n";
- $headers .= ($cc != '') ? "Cc: $cc\r\n" : '';
- $headers .= ($bcc != '') ? "Bcc: $bcc\r\n" : '';
- $headers .= 'Reply-to: ' . $this->replyto . "\r\n";
- $headers .= 'Return-Path: <' . $config['board_email'] . ">\r\n";
- $headers .= 'Sender: <' . $config['board_email'] . ">\r\n";
- $headers .= "MIME-Version: 1.0\r\n";
- $headers .= 'Message-ID: <' . md5(unique_id(time())) . "@" . $config['server_name'] . ">\r\n";
- $headers .= 'Date: ' . gmdate('D, d M Y H:i:s T', time()) . "\r\n";
- $headers .= "Content-type: text/plain; charset={$this->encoding}\r\n";
- $headers .= "Content-transfer-encoding: 8bit\r\n";
- $headers .= "X-Priority: {$this->mail_priority}\r\n";
- $headers .= 'X-MSMail-Priority: ' . (($this->mail_priority == MAIL_LOW_PRIORITY) ? 'Low' : (($this->mail_priority == MAIL_NORMAL_PRIORITY) ? 'Normal' : 'High')) . "\r\n";
- $headers .= "X-Mailer: PhpBB3\r\n";
- $headers .= "X-MimeOLE: phpBB3\r\n";
- $headers .= "X-phpBB-Origin: phpbb://" . str_replace(array('http://', 'https://'), array('', ''), generate_board_url()) . "\r\n";
+ $headers = 'From: ' . $this->from . "\n";
+ $headers .= ($cc != '') ? "Cc: $cc\n" : '';
+ $headers .= ($bcc != '') ? "Bcc: $bcc\n" : '';
+ $headers .= 'Reply-to: ' . $this->replyto . "\n";
+ $headers .= 'Return-Path: <' . $config['board_email'] . ">\n";
+ $headers .= 'Sender: <' . $config['board_email'] . ">\n";
+ $headers .= "MIME-Version: 1.0\n";
+ $headers .= 'Message-ID: <' . md5(unique_id(time())) . "@" . $config['server_name'] . ">\n";
+ $headers .= 'Date: ' . gmdate('D, d M Y H:i:s T', time()) . "\n";
+ $headers .= "Content-type: text/plain; charset={$this->encoding}\n";
+ $headers .= "Content-transfer-encoding: 8bit\n";
+ $headers .= "X-Priority: {$this->mail_priority}\n";
+ $headers .= 'X-MSMail-Priority: ' . (($this->mail_priority == MAIL_LOW_PRIORITY) ? 'Low' : (($this->mail_priority == MAIL_NORMAL_PRIORITY) ? 'Normal' : 'High')) . "\n";
+ $headers .= "X-Mailer: PhpBB3\n";
+ $headers .= "X-MimeOLE: phpBB3\n";
+ $headers .= "X-phpBB-Origin: phpbb://" . str_replace(array('http://', 'https://'), array('', ''), generate_board_url()) . "\n";
$headers .= ($this->extra_headers != '') ? $this->extra_headers : '';
// Send message ... removed $this->encode() from subject for time being
@@ -363,7 +363,14 @@ class messenger
$mail_to = ($to == '') ? 'Undisclosed-Recipient:;' : $to;
$err_msg = '';
- $result = ($config['smtp_delivery']) ? smtpmail($this->addresses, $this->subject, wordwrap($this->msg), $err_msg, $this->encoding, $headers) : @$config['email_function_name']($mail_to, $this->subject, implode("\n", preg_split("/\r?\n/", wordwrap($this->msg))), $headers);
+ if ($config['smtp_delivery'])
+ {
+ $result = smtpmail($this->addresses, $this->subject, wordwrap($this->msg), $err_msg, $this->encoding, $headers);
+ }
+ else
+ {
+ $result = @$config['email_function_name']($mail_to, $this->subject, implode("\n", preg_split("/\r?\n/", wordwrap($this->msg))), $headers);
+ }
if (!$result)
{