title: Laravel app URL not working correctly when sending out mails
body: <p>I have mails that get sent out using a cron on a centos box. The cron calls console/kernal.php where the function get's called to send out the mail</p>
  
  <p>When sending the mail out from within a browser the urls in the mail are correct but when sending with the cron it changes the urls to <code>localhost</code> </p>
  
  <p>I have this in my env file</p>
  
  <p>APP_URL =  example.com</p>
  
  <p>And in my <code>config/app.php</code> I have this  </p>
  
  <pre><code>'url' =&gt; env('APP_URL', 'example.com'),
  </code></pre>
  
  <p>I've done everything to book I believe. If I change the the url env var to <code>http://example.com</code> then the emails get sent out with the right url's but then entire site then get's redireted to <code>http://http//example.com</code></p>
  
  <p>What is going wrong here. Please help</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Stupid dev mistake. I had a middelware that was redirecting if the host did not match so it would then redirect to <a href="http://http//example.com" rel="nofollow noreferrer">http://http//example.com</a></p>
  
  <p>For any stumbling upon this and my own reference, check middelware. Sorry to the guys who tried to help. </p>