title: Sending email using Zend Framework and PHP
body: <p>I working on a form whereby when the user enter in their email account and click on send, an email will be sent to their email account. </p>
  
  <p>I have everything worked out. Just that it doesnt send the email to my account. Anyone have any ideas? Is there a configuration that I left out or something?</p>
  
  <p>This is the sample from my controller:</p>
  
  <pre><code>public function retrieveemailAction(){
  
      $users = new Users();
      $email = $_POST['email'];                
      $view = Zend_Registry::get('view'); 
  
      if($users-&gt;checkEmail($_POST['email'])) {
  
          // The Subject
          $subject = "Email Test";
  
          // The message
          $message = "this is a test";            
  
          // Send email
          // Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise.
          // Use if command to display email message status
          if(mail($email, $subject, $message, $headers)) {
              $view-&gt;operation = 'true';
          }            
      } else {
           $view-&gt;operation = 'false';
      }
  
      $view-&gt;render('retrieve.tpl');
  }
  </code></pre>