【问题标题】:PHP 5.4 and SMTPPHP 5.4 和 SMTP
【发布时间】:2012-10-11 20:18:15
【问题描述】:

我正在尝试将 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,如果有帮助的话。

谢谢。

【问题讨论】:

标签: php email smtp


【解决方案1】:

请使用 php 邮件程序库。这将帮助您解决 PHP 中的任何电子邮件相关问题。

以下是phpmail库的下载链接 http://code.google.com/a/apache-extras.org/p/phpmailer/downloads/list

该库以 zip 格式提供。

解压后请搜索测试文件夹。这将向您展示如何使用该库。

您也可以参考link 使用 gmail 进行电子邮件通信

谢谢!

【讨论】:

    猜你喜欢
    • 2012-08-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-16
    • 1970-01-01
    • 2015-03-16
    • 2017-07-15
    • 1970-01-01
    相关资源
    最近更新 更多