title: Codeigniter SMTP Email with Amazon SES
body: <p>I think yesterday Amazon announced SMTP support for SES (Simple Email Service).</p>
  
  <p>I tried to send SMTP email with Codeigniter with no luck.</p>
  
  <p>I have a verified sender and everything looks good:</p>
  
  <pre><code>$this-&gt;load-&gt;library('email');
  
  $config = array(
      'protocol' =&gt; 'smtp',
      'smtp_host' =&gt; 'email-smtp.us-east-1.amazonaws.com',
      'smtp_user' =&gt; 'SMTP USERNAME',
      'smtp_pass' =&gt; 'SMTP PASSWORD',
      'smtp_port' =&gt; 465,
      'mailtype' =&gt; 'html'
  );
  
  $this-&gt;email-&gt;initialize($config);
  $this-&gt;email-&gt;print_debugger();
  
  $this-&gt;email-&gt;from('verified_email_address@something.com', 'Test From');
  $this-&gt;email-&gt;to('email@example.com', 'Test To');
  $this-&gt;email-&gt;subject('Test');
  $this-&gt;email-&gt;message('test');
  
  $this-&gt;email-&gt;send();
  </code></pre>
  
  <p>I tried the folowing smtp_host:</p>
  
  <ul>
  <li>email-smtp.us-east-1.amazonaws.com</li>
  <li>tls://email-smtp.us-east-1.amazonaws.com</li>
  <li>ssl://email-smtp.us-east-1.amazonaws.com</li>
  </ul>
  
  <p>When i echo the print_debugger() i get:</p>
  
  <pre><code>220 email-smtp.amazonaws.com ESMTP SimpleEmailService-194655181
  hello: 421 Timeout waiting for data from client.
  </code></pre>
  
  <p>These tests run on a mediatemple (gs) server.</p>