title: Query for mail and php mail function
body: <p>Is it correct? Because it don't send emails notification to my email account. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  //mail
    $aquery = "SELECT u.email FROM users u, email_notifications e WHERE u.id = e.users_id AND e.leaves ='yes'";
    $adminget = mysqli_query($link, $aquery) or die(mysqli_error($link));
  
    while ($row = mysqli_fetch_array($adminget)) {
      $emails[] = $row['email'];
    }
  
    $admin = "myemail@abc.com";
    $applicant = $email;
    $subject = "Tomato Portal: New Leave Submission";
  
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
    $headers .= "From:" . "Tomato Portal&lt;info@abc.com&gt;". "\r\n";
    $headers .= "Cc: $applicant" . "\r\n";
    
  
    mail($admin,$subject,$message,$headers);</code></pre>
  </div>
  </div>
  </p>