PHP5.4和SMTP
我试图将PEAR SMTP库与PHP 5.4结合使用,但在使用时遇到以下问题:PHP5.4和SMTP,php,email,smtp,Php,Email,Smtp,我试图将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 static
> 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
谢谢。请使用php邮件库。这将帮助您在PHP中解决任何与电子邮件相关的问题 以下是phpmail库的下载链接 该库以zip格式提供 请在解压缩zip文件后搜索测试文件夹。这将向您演示如何使用该库 您还可以参考有关使用gmail进行电子邮件通信的信息
谢谢 检查此堆栈溢出。也请查看此论坛帖子。这是一篇包含解决方案的帖子,它在前面加了@。似乎有一些php4的用法,这对php5不是很好,并且没有改变。phpMailer是一个比PEAR中更好的邮件类。我建议换成那样。