Witam, mam problem z dodaniem załacznika do Emaila, i już nie weim czy to jakaś literówka czy czegoś nie dodałem, dodam że adres bezwzględny do załacznika poprawny

  1.  
  2. $this->Email->smtpOptions = array(
  3.     'port'=> '25', 
  4.     'timeout'=>'30',
  5.     'host' => 'host',
  6.     'username'=>'Uname',
  7.     'password'=>'pass'
  8.  
  9. );
  10.   /* Set delivery method */
  11.  
  12. $this->Email->delivery = 'smtp';
  13.   /* Do not pass any args to send() */
  14.  
  15. $this->Email->to = $emailDo;
  16.  
  17. $this->Email->subject = $temat;
  18.  
  19. $this->Email->from = $emailOd;
  20.  
  21. $this->Email->template = 'test';
  22.  
  23. $this->Email->sendAs = 'text';
  24.  
  25. $this->Email->attachments = array('http://'.env('SERVER_NAME').'/files/pdf/test.pdf');
  26.  
  27. $this->Email->send();
  28.  
  29. /* Check for SMTP errors. */
  30.  
  31. if(isset($this->Email->smtpError)){
  32.  
  33.      debug($this->Email->smtpError);
  34.  
  35. }
  36.  
  37.  


Po wielkich trudach znalałzem odpowiedź, jesli ktoś będzie miał podobny problem to rozwiazaniem jest dodanie filePath 

  1.  
  2. $this->Email->filePaths = array('/htdocs/'.env('SERVER_NAME').'/app/webroot');
  3.  
  4. $this->Email->attachments = array('files/pdf/test.pdf');
  5.