5
我試圖使用PEAR SMTP庫PHP 5.4,但我有以下問題時使用它:PHP 5.4和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
據我所知,沒有修復爲此,直到PEAR或PEAR腳本的創建者修復它們。我想知道人們使用什麼替代SMTP庫,或者我可以通過SMTP將郵件從我的腳本傳遞到Gmail。我使用Windows,如果有任何幫助。
謝謝。
檢查此堆棧溢出。 http://stackoverflow.com/questions/7114222/what-is-wrong-with-this-php-script-to-send-mail-using-pear-mail –
也檢查了這個論壇張貼。 http://forums.phpfreaks.com/topic/255144-pear-mail-problems/ –
這裏是一個貼子,其中包含一個解決方案,前面加上@。它似乎有一些php4的用法,這是不是很好的php5,並沒有改變。 http://stackoverflow.com/questions/8280829/sending-mail-using-php-and-pear-on-windows –