首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PHP 5.4和SMTP

PHP 5.4和SMTP
EN

Stack Overflow用户
提问于 2012-10-22 10:40:45
回答 1查看 2.4K关注 0票数 5

我正在尝试将PEAR SMTP库与PHP 5.4一起使用,但在使用它时遇到以下问题:

代码语言:javascript
复制
> 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,如果有帮助的话。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 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

谢谢!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13004370

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档