アプリケーションの開発に CakePHP を使用しています。今、添付ファイル「ics」を含む電子メールを送信しようとしていますが、「ファイルが見つかりません...」というエラーが表示されました。これまでに行ったことは次のとおりです。
$Email = new CakeEmail();
$Email->to('admin2@gmail.com');
$Email->subject('TEST');
$Email->replyTo('Company@gmail.com');
$Email->from (array('Company@gmail.com'=>'Company'));
$Email->attachments (array(array('file'=>ROOT.'/app/webroot/files/calendar.ics','mimetype'=>'text/Calendar')));
$Email->sendAs = 'html';
if($this->Email->send()){
$this->Session->setFlash("Email Sent");}
else {
$this->Session->setFlash("Email Not Sent");}
}