wenn ich bei mir die Ads-Seite aufrufe bekomme ich fast immer:
Rufe ich danach die Seite auf, ist alles wieder normal.Failed sending email :: PHP ::
DEBUG MODE
Line : 246
File : emailer.php
Ich denke, dass entstand nach dem Upgrade vom PHP auf den neuesten Stand.
Wonach müsste ich mal schauen?
Zeile 246 ist die letzte message_die am Ende:
Code: Alles auswählen
// Send the mail out to the recipients set previously in var $this->address
// +MOD : MegaMail
function send($email_format = 'text')
// -MOD : MegaMail
{
global $board_config, $lang, $phpEx, $phpbb_root_path, $db;
// Escape all quotes, else the eval will fail.
$this->msg = str_replace ("'", "\'", $this->msg);
$this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg);
// Set vars
reset ($this->vars);
while (list($key, $val) = each($this->vars))
{
$$key = $val;
}
eval("\$this->msg = '$this->msg';");
// Clear vars
reset ($this->vars);
while (list($key, $val) = each($this->vars))
{
unset($$key);
}
// We now try and pull a subject from the email body ... if it exists,
// do this here because the subject may contain a variable
$drop_header = '';
$match = array();
if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match))
{
$this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject');
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
$this->subject = (($this->subject != '') ? $this->subject : 'No Subject');
}
if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match))
{
$this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']);
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
}
else
{
$this->encoding = trim($lang['ENCODING']);
}
if ($drop_header != '')
{
$this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
}
$to = $this->addresses['to'];
$cc = (count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : '';
$bcc = (count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : '';
// +MOD : MegaMail
if ($email_format == 'html')
{
// Build html header
$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/html; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
}
else
{
// Build text header
$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
}
// -MOD : MegaMail
// Send message ... removed $this->encode() from subject for time being
if ( $this->use_smtp )
{
if ( !defined('SMTP_INCLUDED') )
{
include($phpbb_root_path . 'includes/smtp.' . $phpEx);
}
$result = smtpmail($to, $this->subject, $this->msg, $this->extra_headers);
}
else
{
$empty_to_header = ($to == '') ? TRUE : FALSE;
$to = ($to == '') ? (($board_config['sendmail_fix']) ? ' ' : 'Undisclosed-recipients:;') : $to;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
if (!$result && !$board_config['sendmail_fix'] && $empty_to_header)
{
$to = ' ';
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '1'
WHERE config_name = 'sendmail_fix'";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Unable to update config table', '', __LINE__, __FILE__, $sql);
}
$board_config['sendmail_fix'] = 1;
$result = @mail($to, $this->subject, preg_replace("#(?<!\r)\n#s", "\n", $this->msg), $this->extra_headers);
}
}
// Did it work?
if (!$result)
{
message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp) ? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__);
}
return true;
}