In my Symfony2 project, I send email with a link to connect to my website, like
<a href="{{ url('login') }}">LOGIN</a>
When I use this template in a controller, the link is good.
<a href="https://example.com/login">LOGIN</a>
But if I use this template for my mail in a ContainerAwareCommand
with a cron, it looks like
<a href="http://localhost/login">LOGIN</a>
It's not good. How am I suppose to do to make it work ?