title: Zend Framework 2 send email template
body: <p>I am trying to send an email template for email confirmation in registration. Mail is sent, and i can receve it, but i can see the html code in email instead of button and other elemets...
  My <a href="http://jsfiddle.net/3znwG/" rel="nofollow">Mailer class is shown in jsfiddle</a>, i did not know how to post it differently.</p>
  
  <p>My function to send email is the following:</p>
  
  <pre><code>public function sendConfirmationMail($user) {
  
      $urlPlugin = $this-&gt;getServiceLocator()-&gt;get('url_plugin');
      $mailer = $this-&gt;getServiceLocator()-&gt;get('mailer');
      $mailer-&gt;getMessage()
             -&gt;addTo($user-&gt;getContactEmail())
             -&gt;setSubject($this-&gt;getServiceLocator()-&gt;get('translator')-&gt;translate('Confirmation'));
      $mailer-&gt;sendMessage('user/user/mail/confirm', 
          array(
              'user' =&gt; $user-&gt;getName(),
              'confirm_url' =&gt; \App\Application::getBaseUrl() . $urlPlugin-&gt;fromRoute('user_confirm_rs', array()) . '?code=' . md5($user-&gt;getId() . '@' . $user-&gt;getConfirmcode()),
              'valid_until' =&gt; $user-&gt;getConfirmationValidUntil()
          ));
  }
  </code></pre>