title: How to send html email using Amazon SES in PHP
body: <p>I am a complete noob in AWS. I configured AWS SES today and now I am able to send an email to a recipient using this code.</p>
  
  <pre><code>&lt;?php
  
  // Replace sender@example.com with your "From" address. 
  // This address must be verified with Amazon SES.
  define('SENDER', 'sender email');        
  
  // Replace recipient@example.com with a "To" address. If your account 
  // is still in the sandbox, this address must be verified.
  define('RECIPIENT', 'recipient email');  
  
  // Replace smtp_username with your Amazon SES SMTP user name.
  define('USERNAME','my username');  
  
  // Replace smtp_password with your Amazon SES SMTP password.
  define('PASSWORD','my password');  
  
  // If you're using Amazon SES in a region other than US West (Oregon), 
  // replace email-smtp.us-west-2.amazonaws.com with the Amazon SES SMTP  
  // endpoint in the appropriate region.
  define('HOST', 'email-smtp.us-west-2.amazonaws.com');  
  
   // The port you will connect to on the Amazon SES SMTP endpoint.
  define('PORT', '587');     
  
  // Other message information                                               
  define('SUBJECT','Hello from Driffle!');
  define('BODY','Test Email');
  
  require_once 'Mail.php';
  
  $headers = array (
    'From' =&gt; SENDER,
    'To' =&gt; RECIPIENT,
    'Subject' =&gt; SUBJECT);
  
  $smtpParams = array (
    'host' =&gt; HOST,
    'port' =&gt; PORT,
    'auth' =&gt; true,
    'username' =&gt; USERNAME,
    'password' =&gt; PASSWORD
  );
  
   // Create an SMTP client.
  $mail = Mail::factory('smtp', $smtpParams);
  
  // Send the email.
  $result = $mail-&gt;send(RECIPIENT, $headers, BODY);
  
  if (PEAR::isError($result)) {
    echo("Email not sent. " .$result-&gt;getMessage() ."\n");
  } else {
    echo("Email sent!"."\n");
  }
  
  ?&gt;
  </code></pre>
  
  <p>But when I try to send an html formatted email. The output email returns plain text. Looking for a solution to send html emails through Amazon SES.</p>