title: Integrating FOSUserBundle reset email with Amazon SES
body: <p>I configured my postfix to use Amazon SES when sending Emails.
  I am trying to use FOSUserBundle's function to send email for user password reset.
  Unfortunately, the mail never arrive to the mailbox, Amazon SES don't accept the emails forged by the FOSUserBundle.</p>
  
  <p>Does anybody what is the matter with this email:</p>
  
  <pre><code>Content-Transfer-Encoding: quoted-printable
  Content-Type: text/html; charset=utf-8
  MIME-Version: 1.0
  Date: Mon, 15 Oct 2012 04:07:56 +0000
  Message-ID: &lt;1350274076.507b8c1c8cee8@www.yourownpoet.com&gt;
  From: quilly@YourOwnPoet.com
  Subject: blablou
  To: toto@gmail.com
  Bcc: 
      &lt;html&gt;&lt;body&gt;whatever&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>This doesn't work neither:</p>
  
  <pre><code>Content-Type: multipart/alternative;
  boundary="_=_swift_v4_1350274671507b8e6f82b5f_=_"
  MIME-Version: 1.0
  Date: Mon, 15 Oct 2012 04:17:51 +0000
  Message-ID: &lt;1350274671.507b8e6f99894@www.yourownpoet.com&gt;
  From: quilly@YourOwnPoet.com
  Subject: blablou
  To: toto@gmail.com
  Bcc: 
      &lt;html&gt;&lt;body&gt;whatever&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>I created my own mailer service in order to try the emails with different headers (I use SwiftMailer). How should I forge my email so that it goes through Amazon SES?</p>
  
  <p>EDIT:</p>
  
  <p>I noticed that other mail with content-type: multipart/mixed; go through SES, but I don't manage to force the content-type field to this value. Is it possible to do it? Here is how i forge the email:</p>
  
  <pre><code>$message = \Swift_Message::newInstance()
          -&gt;setContentType('multipart/mixed')
          -&gt;setSubject('blablou')
          -&gt;setFrom('quilly@YourOwnPoet.com')
          -&gt;setTo('toto@gmail.com')
          -&gt;setBody('&lt;html&gt;&lt;body&gt;whatever&lt;/body&gt;&lt;/html&gt;', 'text/html')
          -&gt;addPart('fdsfsd', 'text/plain');
  
  $this-&gt;mailer-&gt;send($message);
  </code></pre>
  
  <p>But the content-type is still 'multipart/alternative'..</p>