aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_messenger.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-11-23 22:25:46 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-11-23 22:25:46 +0000
commit5f35bc9bc1c062bdab2d01678c464a41759488bb (patch)
tree462c46a0fa13ea55da4a36a3703cc80e76e53fe7 /phpBB/includes/functions_messenger.php
parent37edf4148ce11d03c45caafe7fc694b4b063cf38 (diff)
downloadforums-5f35bc9bc1c062bdab2d01678c464a41759488bb.tar
forums-5f35bc9bc1c062bdab2d01678c464a41759488bb.tar.gz
forums-5f35bc9bc1c062bdab2d01678c464a41759488bb.tar.bz2
forums-5f35bc9bc1c062bdab2d01678c464a41759488bb.tar.xz
forums-5f35bc9bc1c062bdab2d01678c464a41759488bb.zip
my attempt to break things...
git-svn-id: file:///svn/phpbb/trunk@4682 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r--phpBB/includes/functions_messenger.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index fea4b3767c..cda1dd7e8c 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -272,8 +272,10 @@ class messenger
$headers .= 'Date: ' . gmdate('D, d M Y H:i:s T', time()) . "\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
- $headers .= "X-Mailer: PHP\n";
- $headers .= "X-MimeOLE: Produced By phpBB2\n";
+ $headers .= "X-Mailer: PhpBB\n";
+ $headers .= "X-MimeOLE: phpBB\n";
+ $headers .= "X-phpBB-Origin: phpbb://" . str_replace(array('http://', 'https://'), array('', ''), generate_board_url()) . "\n";
+
$headers .= ($this->extra_headers != '') ? $this->extra_headers : '';
$headers .= "Content-type: text/plain; charset=" . $this->encoding . "\n";
$headers .= "Content-transfer-encoding: 8bit\n";
@@ -281,9 +283,9 @@ class messenger
// Send message ... removed $this->encode() from subject for time being
if (!$use_queue)
{
- $mail_to = ($to == '') ? 'Undisclosed-Recipients:;' : $to;
+ $mail_to = ($to == '') ? 'Undisclosed-Recipient:;' : $to;
$err_msg = '';
- $result = ($config['smtp_delivery']) ? smtpmail($this->addresses, $this->subject, $this->msg, $err_msg, $headers) : @mail($mail_to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $headers);
+ $result = ($config['smtp_delivery']) ? smtpmail($this->addresses, $this->subject, $this->msg, $err_msg, $headers) : @$config['mail_function_name']($mail_to, $this->subject, implode("\n", preg_split("/\r?\n/", $this->msg)), $headers);
if (!$result)
{
@@ -406,7 +408,7 @@ class queue
$this->data[$object]['data'][] = $scope;
}
- // Thinking about a lock file...
+ // Using lock file...
function process()
{
global $db, $config, $phpEx, $phpbb_root_path;
@@ -483,10 +485,10 @@ class queue
{
case 'email':
$err_msg = '';
- $to = (!$to) ? 'Undisclosed-Recipients:;' : $to;
+ $to = (!$to) ? 'Undisclosed-Recipient:;' : $to;
+
+ $result = ($config['smtp_delivery']) ? smtpmail($addresses, $subject, $msg, $err_msg, $headers) : $config['email_function_name']($to, $subject, implode("\n", preg_split("/\r?\n/", $msg)), $headers);
- $result = ($config['smtp_delivery']) ? smtpmail($addresses, $subject, $msg, $err_msg, $headers) : mail($to, $subject, preg_replace("#(?<!\r)\n#s", "\r\n", $msg), $headers);
-
if (!$result)
{
@unlink($this->cache_file . '.lock');
@@ -562,7 +564,7 @@ class queue
$file = '<?php $this->queue_data = ' . $this->format_array($this->data) . '; ?>';
- if ($fp = @fopen($this->cache_file, 'w'))
+ if ($fp = fopen($this->cache_file, 'w'))
{
@flock($fp, LOCK_EX);
fwrite($fp, $file);