Using MSMTP with CodeIgniter email library : <p>Has anyone successfully been able to send email using the standard CodeIgniter email library when using msmtp?</p>

<p>I'm running Ubuntu and I've successfully installed and configured MSMTP.  I've been able to send email from the command line and also using the default PHP <code>mail()</code> function.  </p>

<p>My <code>application/config/email.php</code> file looks like this</p>

<pre><code>$config = array(
    'protocol' =&gt; 'sendmail',
    'mailpath' =&gt; '/usr/bin/msmtp -C /etc/msmtp/.msmtprc -t',
    'smtp_host' =&gt; 'smtp.gmail.com',
    'smtp_user' =&gt; 'myemail@gmail.com',
    'smtp_pass' =&gt; 'xxxxxxxx',
    'smtp_port' =&gt; 587,
    'smtp_timeout' =&gt; 30,
    'smtp_crypto' =&gt; 'tls',
);
</code></pre>

<p>But this doesn't work.  If anyone's been successful it would be good to know how you did it.  Ideally I'd like to use CodeIgniter's email library as it has a lot of good functionality that I don't want to have to write myself.  </p>
