PHP邮件的问题 [英] Problem with php mailer

查看:67
本文介绍了PHP邮件的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

am在运行php mailer时遇到这些错误.可能是什么问题

am getting these errors while running php mailer. What could be the problem

MAMP/htdocs/practice/email/email.php on line 2
[06-Jun-2011 09:53:40] PHP Notice:  Undefined variable: from in     /Applications/MAMP/htdocs/practice/phpmailer/phpmailer.inc.php on line 259
[06-Jun-2011 09:53:40] PHP Notice:  Undefined variable: Encoding in /Applications/MAMP/htdocs/practice/phpmailer/phpmailer.inc.php on line 271
[06-Jun-2011 09:53:40] PHP Fatal error:  Cannot access empty property in /Applications/MAMP/htdocs/practice/phpmailer/phpmailer.inc.php on line 271

推荐答案

请确保您使用的是最新版本PHPMailer ,5.1.该发行版中没有这样的文件"phpmailer.inc.php",这意味着您使用的代码完全不正确或已过时.确实,我可以找到的对该文件的唯一参考是2003年发布的版本.

Please be sure that you are using the latest release of PHPMailer, 5.1. There is no such file "phpmailer.inc.php" in that release, which implies that the code you're using is either entirely incorrect or horribly obsolete. Indeed, the only reference I could find to that file is from a release dating back to 2003.

您可能还想考虑使用更现代的邮件库,例如 SwiftMailer .

You might also want to consider using a more modern mailing library instead, like SwiftMailer.

这篇关于PHP邮件的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆