title: How to send emails with attachments using CakePHP 1.3?
body: <p>I am working over to send email with attachments.
  I am using php default configurations to send email but using CakePHP framework.</p>
  
  <pre><code>$fromEmail = $from_name." &lt;".$from_email."&gt;";
  $this-&gt;Email-&gt;from = $fromEmail;
  $this-&gt;Email-&gt;to = trim($email);
  $this-&gt;Email-&gt;subject = $subjects[$this-&gt;params['action']];
  $this-&gt;Email-&gt;sendAs = 'text';
  $this-&gt;Email-&gt;template = $this-&gt;params['action'];
  print_r($attachments); exit; // Gave me an empty Array ( )
  $this-&gt;Email-&gt;attachments = $attachments;
  
  $attachments = array( );
              if ( ! empty($this-&gt;data['Submit']['files'])) {
                  $attach_files = $this-&gt;Document-&gt;DocumentDocument-&gt;find('all', array(
                      'conditions' =&gt; array(
                          'MailDocument.Mail_id' =&gt; $this-&gt;data['Submit']['prop_id'],
                          'MailDocument.id' =&gt; $this-&gt;data['Submit']['files'],
                      ),
                  ));
                  $attachments = Set::combine($attach_files, '/PropertyDocument/file', '/PropertyDocument/file_path');
              }
  </code></pre>
  
  <p>I understand we have to define file path in cakePHP.</p>
  
  <p>Where am I going wrong?</p>