title: Sending email from Magento to fails
body: <p>I am trying to send an email from a custom module in magento, however it fails to send it.
  do i need to include anything or should i make some configuration with my hosting?
  Here you can see my code:</p>
  
  <pre><code>                $mail = new Zend_Mail();  
                  $mail-&gt;setBodyText($mailbody);
                  $mail-&gt;setFrom('admin@gmail.com', 'admin');
                  $mail-&gt;addTo('email@gmail.com', 'client');
                  $mail-&gt;setSubject('Error report');
  
  
                  try {
                      $mail-&gt;send();
                      Mage::getSingleton('core/session')-&gt;addSuccess('Your request has been sent');
                  }
                  catch (Exception $e) {
                      Mage::getSingleton('core/session')-&gt;addError('Unable to send.');
                      }
  </code></pre>