1
我想通過CakePHP郵件發送一些圖像文件。CakePHP 1.3:我們如何在cakephp中發送帶有2個或更多(文件)附件的電子郵件?
目前我使用$this->Email->attachments = array($Path.$fileName);
只有一個文件 我想在一封電子郵件中發送多個文件。
我想通過CakePHP郵件發送一些圖像文件。CakePHP 1.3:我們如何在cakephp中發送帶有2個或更多(文件)附件的電子郵件?
目前我使用$this->Email->attachments = array($Path.$fileName);
只有一個文件 我想在一封電子郵件中發送多個文件。
它的工作原理與手冊中所描述的一樣,只是爲數組添加更多路徑。
http://book.cakephp.org/1.3/view/1638/Attachments
$this->Email->attachments = array(
$Path . $fileName,
$Path . $someOtherFile
);
坦克了很多。爲您的參考。我使用了 'code' $ this-> Email-> attachments = array($ this-> data ['form'] ['file0'] ['name'] => $ this-> data ['form'] [ 'file0'] [ 'tmp_name的值'],$這 - >數據[ '形式'] [ '文件1'] [ '名稱'] => $這 - >數據[ '形式'] [ '文件1'] [」 tmp_name的值']); 'code' 謝謝 –