Ich versuche Transaktions-E-Mails mit PEAR zu senden. Mein PHP-Code:PHP PEAR Mail Schwerwiegender Fehler
include('Mail.php');
include('Mail/mime.php');
$text = 'test text';
$html = '<html><body><b>HTML</b></body></html>';
$crlf = "\n";
$hdrs = array(
'From' => '***@***.com',
'Subject' => 'Test - PEAR mail'
);
$mime = new Mail_mime($crlf);
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
$mail = Mail::factory('smtp',
array ('host' => 'mail.***.com',
'auth' => true,
'username' => '***@***.com',
'password' => '***'));
$mail->send(***@***.com, $hdrs, $body);
Das Ergebnis:
"Fatal error: Call to undefined Methode PEAR :: Raiseerror() in /home4/good7/php/Net/SMTP.php on line 349"
ich hatte einen Blick auf Linie 349 in SMTP.php:
return PEAR::raiseError('Invalid response code received from server', $this->code);
ich gehe davon aus, dass der Fehler in meinem Code, nicht in SMTP.php, aber ich kann es nicht finden.
Diese Seite ist auf Shared Hosting.
Jeder Einblick geschätzt.
Vielen Dank für mich in die richtige Richtung. Hat sich als Fehler beim Include-Pfad herausgestellt. – blogo