tja. nun geht es um folgendes. die email wird versendet. jedoch wird das template irgendwie nicht angenommen. keine ahnung warum. am besten ich poste einmal hier alles wichtige:Warning: filesize() [function.filesize]: Stat failed for (errno=2 - No such file or directory) in /www/htdocs/inu/includes/emailer.php on line 98
funktion der emailer.php:
Code: Alles auswählen
function use_template($template_file)
{
global $boot_root_path;
if (trim($template_file) == '')
{
message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__);
}
if (empty($this->tpl_msg[$template_file]))
{
$tpl_file = $boot_root_path . 'email/' . $template_file . '.tpl';
if (!@file_exists(@phpbb_realpath($tpl_file)))
{
$tpl_file = $boot_root_path . 'email/' . $template_file . '.tpl';
if (!@file_exists(@phpbb_realpath($tpl_file)))
{
message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__);
}
}
if (!($fd = @fopen($tpl_file, 'r')))
{
message_die(GENERAL_ERROR, 'Failed opening template file :: ' . $tpl_file, '', __LINE__, __FILE__);
}
$this->tpl_msg[$template_file] = fread($fd, filesize($this->tpl_file));
fclose($fd);
}
$this->msg = $this->tpl_msg[$template_file];
return true;
}
Code: Alles auswählen
if ( !$error )
{
include($boot_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer(0);
$emailer->from($page_config['page_email']);
$emailer->replyto($page_config['page_email']);
for ($i = 0; $i < count($bcc_list); $i++)
{
$emailer->bcc($bcc_list[$i]);
}
$email_headers = 'X-AntiAbuse: Board servername - ' . $page_config['server_name'] . "\n";
$emailer->use_template('contact_email');
$emailer->email_address($page_config['page_email']);
$emailer->set_subject($subject);
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
'SITENAME' => $page_config['page_name'],
'BOARD_EMAIL' => $page_config['page_email'],
'L_NAME' => $name,
'L_EMAIL' => $email,
'L_CONTENT' => $content)
);
$emailer->send();
$emailer->reset();
message_die(GENERAL_MESSAGE, 'E-Mail wurde gesendet<br /><br />' . sprintf('Hier klicken, um zurück zu kehren', '<a href="index.'.$phpEx.'?show=contact">', '</a>'));
}
}
if ( $error )
{
message_die(GENERAL_MESSAGE, $error_msg);
}
Code: Alles auswählen
Charset: iso-8859-1
{SITENAME}
{BOARD_EMAIL}
Die Nachricht :
~~~~~~~~~~~~~~~
Name: {L_NAME}
E-Mail: {L_EMAIL}
Nachricht: {L_CONTENT}
auffällig ist, dass in der fehlermeldung nach Stat failed for der pfad der template datei nicht angezeigt wird.
bitte um hilfe. der fehler ist bestimmt banal aber ich finde ihn nicht.
HINWEIS: Wie man sieht lehnt sich diese ganze Code-Geschichte an phpbb an.