我正在尝试将PEAR SMTP库与PHP 5.4一起使用,但在使用它时遇到以下问题:
> 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,如果有帮助的话。
谢谢。
发布于 2013-02-13 21:54:40
请使用php邮件库。这将帮助您在PHP中解决任何与电子邮件相关的问题。
以下是phpmail库http://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list的下载链接
该库以zip格式提供。
请在解压zip后搜索测试文件夹。这将向您演示如何使用该库。
您也可以参考使用gmail进行电子邮件通信的link。
谢谢!
https://stackoverflow.com/questions/13004370
复制相似问题