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.
überprüfen Sie diesen Stapelüberlauf. http://stackoverflow.com/questions/7114222/what-is-wrong-with-this-php-script-to-send-mail-using-pear-mail –
auch in diesem Beitrag im Forum. http://forums.phpfreaks.com/topic/255144-pear-mail-problems/ –
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 –