title: How to configure .env file avoid spam mail in Laravel 5.4
body: <p>I am working with Laravel 5.4. When I am sending mail from Local server  mail is going to the inbox folder working fine, configure file <strong>.env</strong> following :-</p>
  
  <pre><code>MAIL_DRIVER=smtp
  MAIL_HOST=smtp.gmail.com
  MAIL_PORT=587
  MAIL_USERNAME=email
  MAIL_PASSWORD=password
  MAIL_ENCRYPTION=tls
  </code></pre>
  
  <p>After that I shift to live server and I configure the <strong>.env</strong> file following:-></p>
  
  <pre><code>MAIL_DRIVER=sendmail
  MAIL_HOST=smtp.gmail.com
  MAIL_PORT=465
  MAIL_USERNAME=null
  MAIL_PASSWORD=null
  MAIL_ENCRYPTION=ssl
  </code></pre>
  
  <p>mail receive but in spam folder.How to avoid from spam folder.</p>
  
  <p>Here is my Controller  function</p>
  
  <pre><code>function createSchool(Request $request){
  
          $this-&gt;validator($request-&gt;all())-&gt;validate();
  
          $user = $this-&gt;create($request-&gt;all());
  
          if($user){
  
              $mailInformation = $request-&gt;all();
  
              if($mailInformation){
  
                  Mail::to($request-&gt;user())
                  -&gt;cc($mailInformation['email'])
                  -&gt;send(new SchoolRegistration($mailInformation)); 
              }
  
              return redirect('admin/schools')-&gt;with('success', 'School  added Successfully');
          }
      }
  </code></pre>