2012-10-22 13 views
5

Ich versuche, die PEAR SMTP-Bibliothek mit PHP 5.4 zu verwenden, aber ich bin die folgenden Probleme haben, wenn sie mit:PHP 5.4 und SMTP

> Strict Standards: Non-static method Mail::factory() should not be called statically in C:\xampp\htdocs\forgot.php on line 75 

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Mail\smtp.php on line 365 

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Net\SMTP.php on line 450 

Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Net\SMTP.php on line 451 

Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Mail\smtp.php on line 369 

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Mail\smtp.php on line 249 

Soweit mir bekannt ist, gibt es keine fix dafür, bis PEAR oder die Ersteller der PEAR-Skripte sie reparieren. Ich frage mich, welche alternativen SMTP-Bibliotheken Benutzer verwenden oder was ich tun kann, um E-Mails von meinem Skript über SMTP an Google Mail zu senden. Ich benutze Windows, wenn das hilft.

Vielen Dank.

+1

überprüfen Sie diesen Stapelüberlauf. http://stackoverflow.com/questions/7114222/what-is-wrong-with-this-php-script-to-send-mail-using-pear-mail –

+0

auch in diesem Beitrag im Forum. http://forums.phpfreaks.com/topic/255144-pear-mail-problems/ –

+0

und hier ist ein Posting, das eine Lösung enthält, indem man ein @ vorstellt. Es scheint, dass es eine php4-Nutzung gibt, das ist mit php5 nicht sehr nett und wurde nicht geändert. http://stackoverflow.com/questions/8280829/sending-mail-using-php-and-pear-on-windows –

Antwort

1

Bitte verwenden Sie die PHP-Mailer-Bibliothek. Dies wird Ihnen helfen, jedes E-Mail-Problem in PHP zu lösen.

Es folgt der Download-Link der phpmail Bibliothek http://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

Die Bibliothek im Zip-Format zur Verfügung.

Suchen Sie nach dem Extrahieren des Zip nach dem Testordner. Dies wird Ihnen zeigen, wie man die Bibliothek benutzt.

Sie können auch die link beziehen für gmail für E-Mail-Kommunikation

Dank!

Verwandte Themen