title: Sending an HTML email using Swift
body: <p>I would like to send an auto-generated email with HTML body from my application using Swift.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>$message = Swift_Message::newInstance()
                  -&gt;setFrom(array('dummy1@test.com' =&gt; 'John Doe'))
                  -&gt;setTo('dymmy2@test.com')
                  -&gt;setSubject('some subject');
  
              $message-&gt;setBody($this-&gt;getPartial('global/mail_partial'));
  
              $this-&gt;getMailer()-&gt;send($message);
  </code></pre>
  
  <p>I had already tried to change the header Content-type of the email message using some specific Swift methods but it is not working.</p>