title: Sending email with CakeEmail
body: <p>In my CakePHP application I have an email form I have made myself that opens when an email hyperlink is clicked. How do I then pass the data from the form so that it can be sent using CakeEmail? Sorry, I've tried this for ages and checked through all the documentation on <a href="http://book.cakephp.org/2.0/en/core-utility-libraries/email.html" rel="nofollow">http://book.cakephp.org/2.0/en/core-utility-libraries/email.html</a>, still can't figure it out.</p>
  
  <p>Here is my code...</p>
  
  <p><strong>email.ctp</strong></p>
  
  <pre><code>&lt;?php $this-&gt;Html-&gt;addCrumb('New Email', '#'); ?&gt;
  
  &lt;div id="email_page" class="span12"&gt;
      &lt;div class="row"&gt;
  
      &lt;?php 
          echo $this-&gt;Form-&gt;create('Email', array('controller'=&gt;'person', 'action'=&gt;'email_send'));
          echo $this-&gt;Form-&gt;input('email', array('class'=&gt;'email_form','label'=&gt;'To: ','value'=&gt;$email['Person']['primEmail']));
          echo $this-&gt;Form-&gt;input('subject', array('class'=&gt;'email_form','label'=&gt;'Subject: '));
          echo $this-&gt;Form-&gt;input('message', array('class'=&gt;'email_form email_body', 'type'=&gt;'textarea','label'=&gt;'Message: '));
          echo $this-&gt;Form-&gt;end('Send', array('class'=&gt;'pull-right')); 
      ?&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>email_send.php</strong></p>
  
  <pre><code>&lt;?php
      $email = new CakeEmail('default');
      $email-&gt;to('email');
      $email-&gt;subject('subject');
      $email-&gt;send('message');
  ?&gt;
  </code></pre>
  
  <p>Any help is appreciated!</p>