I'm using CakePHP to develop my application. Now I'm trying to send Email with attachment file 'ics' but i got an error 'File not found ...' Here's what i've done untill now :
$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");}
}