FOSUser email confirmation is not working
<p>I am trying send confirmation email to user after registration. I customised email template, so that user can receive email with confirmation url in it.</p>

<p>These are my configurations</p>

<pre><code>fos_user:
  # ...
  service:
      mailer: fos_user.mailer.twig_swift
  registration:
      confirmation:
          template: AppBundle:Email:registration.email.twig
          from_email:
              address:        registration@example.com
              sender_name:    Example
</code></pre>

<p>This is my template</p>

<pre><code>  {% block subject %}Registration Success{% endblock %}

  {% block body_text %}
     {% autoescape false %}
         Hello {{ user.fullName }}!

         Thanks for registering

         &lt;p&gt;&lt;a href="{{ confirmationUrl }}"&gt;verify&lt;/a&gt;&lt;/p&gt;

         Greetings,
         CofiCo team
    {% endautoescape %}

 {% endblock %}
</code></pre>

<p>I am triggering email sending in my controller manually:</p>

<pre><code>$token = sha1(uniqid(mt_rand(), true));
$user-&gt;setConfirmationToken($token);
$this-&gt;get('fos_user.mailer')-&gt;sendConfirmationEmailMessage($user);
</code></pre>

<p>The email is not sending with this template. However If I remove <code>{{ confirmationUrl }}</code> from template, email send works fine.</p>

<p>How can I send email with confirmation URL?</p>