简体   繁体   English

CakePHP 1.3:我们如何在cakephp中发送包含2个或更多(文件)附件的电子邮件?

[英]CakePHP 1.3: How we can send email with 2 or more (file) attachments in cakephp?

I want to send some image files via CakePHP mail. 我想通过CakePHP邮件发送一些图像文件。

Currently I am using $this->Email->attachments = array($Path.$fileName); 目前我正在使用$this->Email->attachments = array($Path.$fileName); for one file only I want to send multiple files in one email. 仅限一个文件我想在一封电子邮件中发送多个文件。

It works just like described in the manual, simply add more paths to the array. 它的工作方式与手册中描述的一样,只需添加更多路径即可。

http://book.cakephp.org/1.3/view/1638/Attachments http://book.cakephp.org/1.3/view/1638/Attachments

$this->Email->attachments = array(
    $Path . $fileName,
    $Path . $someOtherFile
);

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

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