Problem with php mailer

不问归期 提交于 2020-01-15 18:25:16

问题


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

回答1:


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.

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




回答2:


The download link on PHPMailer's website is wrong. Instead of downloading PHPMailer v. 5+ you downloaded PHPMailer 4. Edit the download link and change the # 4 to 5. Then you get the correct version.



来源:https://stackoverflow.com/questions/6248853/problem-with-php-mailer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!