title: Sending email with CodeIgniter using 'mail' or 'sendmail'
body: <p>I built an intranet app that needs to send email (low volume). I will not be able to use the SMTP server of my organization, so I need to send these emails via <code>sendmail</code> or <code>mail</code>.</p>
  
  <p>However, when I config my email as:</p>
  
  <pre><code>$config['protocol'] = 'sendmail';
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Exit status code: 127
  Unable to open a socket to Sendmail. Please check settings.
  Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.
  </code></pre>
  
  <p>and when I use:</p>
  
  <pre><code>$config['protocol'] = 'mail';
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.
  </code></pre>
  
  <p>Is there anything I should setup in PHP or check in <code>phpinfo()</code> to figure out how to get this to work?</p>