简体   繁体   English

cakephp电子邮件组件phpmailer

[英]cakephp email component phpmailer

I am using CakePHP 1.2 version and trying to send an email with PHPMailer library for my email function however while trying to send an email, it gets below mention error: 我正在使用CakePHP 1.2版本,并尝试使用PHPMailer库发送电子邮件功能用于我的电子邮件功能,但是在尝试发送电子邮件时,出现以下提及错误:

Fatal error: Class 'PHPMailer' not found in /var/www/xyz/app/controllers/components/email.php on line 80 致命错误:在第80行的/var/www/xyz/app/controllers/components/email.php中找不到类'PHPMailer'

Tried different ways to include vendor library into controller/app controller files, but it doesn't help much to resolve an error. 尝试了不同的方式将供应商库包含到控制器/应用程序控制器文件中,但解决错误没有太大帮助。

Any clues/ideas to resolve it ASAP. 尽快解决它的任何线索/想法。

Thanks ! 谢谢 !

Do you use 你用

App::import('Vendor', 'PhpMailer', array('file' => 'phpmailer' . DS . 'class.phpmailer.php'));

?

Here is a tutorial for phpmailer and Cakephp 这是phpmailer和Cakephp的教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM