title: Sending mails everyday using schedulers in Laravel
body: <p>I am not receiving any email. Please help me out. I have changed the environment properly.</p>
  <pre><code>use App\User;
  use App\Mail\NotifyEmail;
  
  class Notify extends Command
  {
      protected $signature = 'notify:email';
      protected $description = 'Send an email to all the users everyday';
      public function handle()
      {
          $emails = User::pluck('email')-&gt;toArray();
          $data = ['title' =&gt; 'programming' , 'body' =&gt; 'php'];
          foreach($emails as $email){
              Mail::To($email) -&gt;send(new NotifyEmail($data));
          }
      }
  }
  
  </code></pre>
  <p>My kernel.php has :</p>
  <pre><code>$schedule-&gt;command('notify:email') -&gt;daily();
  </code></pre>
  <p><code>App\Mail\NotifyEmail.php</code> :</p>
  <pre><code>class NotifyEmail extends Mailable
  {
      use Queueable, SerializesModels;
      public $details;
      public function __construct($data)
      {
          $this -&gt; details = $data;
      }
  
      public function build()
      {
          return $this-&gt;view('mail', compact(varname: 'details'));
      }
  }
  </code></pre>
  <p><code>mail.blade.php</code> contains <code>{{$details['title']}}</code> and <code>{{$details['body']}}</code>.</p>