Das Thema ist für mich seit jeher Horror. Hab immer Probleme gehabt. Vielleicht kann mir doch jemand helfen ?!?
Den php-Mailer hatte ich anhand dieses Beitrags eingerichtet:
https://www.mybb.de/forum/thread-5559-po...l#pid40176
Meine mailhandlers/php.php hat zur Zeit folgenden Code - könnte da der Fehler liegen ?
?php
/**
* MyBB 1.6
* Copyright 2010 MyBB Group, All Rights Reserved
*
* Website:
http://mybb.com
* License:
http://mybb.com/about/license
*
* $Id: php.php 5297 2010-12-28 22:01:14Z Tomm $
*/
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
/**
* PHP mail handler class.
*/
class PhpMail extends MailHandler
{
/**
* Additional parameters to pass to PHPs mail() function.
*
* @var string
*/
public $additional_parameters = '';
/**
* Sends the email.
*
* @return true/false whether or not the email got sent or not.
*/
function send()
{
global $lang, $mybb;
// For some reason sendmail/qmail doesn't like \r\n
$this->sendmail = @ini_get('sendmail_path');
if($this->sendmail)
{
$this->headers = str_replace("\r\n", "\n", $this->headers);
$this->message = str_replace("\r\n", "\n", $this->message);
$this->delimiter = "\n";
}
// Some mail providers ignore email's with incorrect return-to path's so try and fix that here
$this->sendmail_from = @ini_get('sendmail_from');
if($this->sendmail_from != $mybb->settings['adminemail'])
{
@ini_set("sendmail_from", $mybb->settings['adminemail']);
}
// If safe mode is on, don't send the additional parameters as we're not allowed to
if(ini_get('safe_mode') == 1 || strtolower(ini_get('safe_mode')) == 'on')
{
$sent = @mail($this->to, $this->subject, $this->message, trim($this->headers));
}
else
/**
disable '$sent = @mail()' - instead use 'PHPMailer_v5.1'
ref ==>
https://www.mybb.de/forum/thread-5559-po...l#pid40176
*/
{
//$sent = @mail($this->to, $this->subject, $this->message, trim($this->headers), $this->additional_parameters);
require_once(MYBB_ROOT."/inc/PHPMailer_v5.1/class.phpmailer.php");
$mail = new PHPMailer;
$mail->From = $mybb->settings['adminemail'];
$mail->FromName = "{$mybb->settings['bbname']} Mailer";
$mail->Mailer = "smtp";
$mail->Host = "webrelay.MEINHOSTER.de";
$mail->SMTPAuth = false;
$mail->Username = "";
$mail->Password = "";
$mail->Subject = $this->subject;
$mail->Body = $this->message;
$mail->AddAddress($this->to);
$mail->Send();
$mail->ClearAddresses();
$sent = 'PHPMailer';
}
//$function_used = 'mail()';
$function_used = 'PHPMailer';
if(!$sent)
{
//$this->fatal_error("MyBB was unable to send the email using the PHP {$function_used} function.");
$this->fatal_error("MyBB was unable to send the email using the '{$function_used}' class.");
return false;
}
//
return true;
}
}
?>