title: Cannot redeclare Send_mail() error
body: <p>I m trying to make a function which can check the database for active customer whose status is 1 if active, they should receive email.
  For Email Functionality I had used PHP Mailer function.</p>
  
  <p>Below is my script:</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>&lt;?php
  include '../mailer/class.phpmailer.php';
  $sqlx = mysql_query("SELECT * from `cust");
  
  $numRows = mysql_num_rows($sqlx);
  $mail_body = '';
  while($row = mysql_fetch_array($sqlx))
  {
  // fetch email
  
  $uid = $row["uid"];
  $email = $row["email"];
  
  $count = "20";
  if($count &lt;= '70')
  {
  $f_name = "abc";
  $f_email = "abc@xyz.com";
  $mail_body = "Hii message";
  $subject = "Hi you got notificaiton";
  $headers  = "From: abc &lt;abc@xyz.com&gt;";
  $headers .= "Content-type: text/html\r\n";
  
  function Send_mail($email, $subject, $headers, $mail_body, $f_email, $f_name)
  {
   $mail = new PHPMailer(); 
   $Email = $email;
   $fname = $f_name;
   $femail = $f_email; 
   //==================smtp mail ===============================//
   $mail-&gt;IsSMTP(); // telling the class to use SMTP
   $mail-&gt;SMTPAuth = true;
   $mail-&gt;Port= 25; //  Sets the default SMTP server port.
   $mail-&gt;SMTPSecure= 'tls'; //  Options are "", "ssl" or "tls"
   $mail-&gt;Host = 'localhost'; // SMTP server 
   $mail-&gt;Username = 'abc@xyz.com';  // Sets SMTP username. 
   $mail-&gt;Password = '1234556';  //Sets SMTP password. 
   //=========================================================// 
    
   $fname = $f_name;
   $femail = $f_email;       // email address of reciever 
   $mail-&gt;WordWrap = 50;                              // set word wrap 
   $mail-&gt;IsHTML(true);                               // send as HTML  
   $mail-&gt;Subject  =  $subject;      // subject of mail 
   $mail-&gt;Body     =  $mail_body;      // body of mail  
   $mail-&gt;Send();   return true;
  }
  
  $mail_result=Send_Mail($email, $subject, $headers, $mail_body,$f_email, $f_name);
  
  
  }
  
  }
  
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But i getting error:</p>
  
  <blockquote>
    <p>You must provide at least one recipient email address. 
    Fatal error: Cannot redeclare Send_mail() (previously declared in C:\xampp\htdocs\testing\update.php:161) in C:\xampp\htdocs\testing\update.php on line 161</p>
  </blockquote>