从txt列表发送邮件时的php延迟

i have this script for sending mails from a emails.txt list and is working fine but is there a way to delay the sending of emails from the list? Any help is appreciated,thanks!

This is the Php sender script:

if($_POST)
{

     $recipient_email    = '';  

      $name    = filter_var($_POST["name"], FILTER_SANITIZE_STRING);  
      $from_email = filter_var($_POST["sender_email"], FILTER_SANITIZE_STRING); 
    $bcc    = filter_var($_POST["bcc"], FILTER_SANITIZE_STRING);  
    $reply_to_email = filter_var($_POST["email"], FILTER_SANITIZE_STRING);  
    $subject        = filter_var($_POST["subject"], FILTER_SANITIZE_STRING);  
    $message        = filter_var($_POST["message"], FILTER_SANITIZE_STRING); 
        $mesaj        = filter_var($_POST["message"], FILTER_SANITIZE_STRING); 

        //Get uploaded file data
    $file_tmp_name    = $_FILES['my_file']['tmp_name'];
    $file_name        = $_FILES['my_file']['name'];
    $file_size        = $_FILES['my_file']['size'];
    $file_type        = $_FILES['my_file']['type'];
    $file_error       = $_FILES['my_file']['error'];

      $lista    = $_FILES['lista']['tmp_name'];

    if($file_error > 0)
    {
        die('Upload error or No files uploaded');
    }

         $handle = fopen($file_tmp_name,'rb');

         // Now read the file content into a variable
         $content = fread($file,filesize($file_tmp_name));

         // close the file
         fclose($handle);

         // Now we need to encode it and split it into acceptable length lines
        $encoded_content = chunk_split(base64_encode(file_get_contents($file_tmp_name)));

          $uid = md5(date('r', time()));

      //header
       $headers = "From: ".$name." <".$from_email.">
";
       $headers .= "Bcc: $bcc
";
       $headers .= "Reply-To: ".$reply_to_email."
";
       $headers .= "MIME-Version: 1.0
";
       $headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-".$uid."\"

";

$message = "--PHP-mixed-$uid
"."Content-Type: multipart/alternative; boundary=\"PHP-alt-$uid\"

";
$message .= "--PHP-alt-$uid
"."Content-Type: text/plain; charset=\"iso-8859-1\"
"."Content-Transfer-Encoding: 7bit

";

//Insert the html message.
 $message .= $mesaj;
 $message .="

--PHP-alt-$uid--

";

//include attachment
$message .= "--PHP-mixed-$uid
"."Content-Type: $file_type; name=\"$file_name\"
"."Content-Transfer-Encoding: base64
"."Content-Disposition: attachment

";
$message .= $encoded_content;
$message .="Content-Transfer-Encoding: base64
";
$message .="X-Attachment-Id: ".rand(1000,99999)."

"; 
$message .= "/r/n--PHP-mixed-$uid--";

    $list = fopen($lista, "r");

    if ($list) {
         while (($line = fgets($list)) !== false) {

            if (!mail($line, $subject, $message, $headers)) 
            { 
                echo "Eroare! Nu am putut trimite mailurile."; 
            }
            else
            { 

                echo "Mailurile au fost trimise!"; 
            }


            }  
fclose($list);
        }
} 

Html form fields:

<form enctype="multipart/form-data" method="POST" action="">
<label>Name <input type="text" name="sender_name" /> </label> 
</br><label>Mail <input type="email" name="sender_email" /> </label> 
<label>Bcc <input type="text" name="bcc" /> </label> 
</br><label>Subject <input type="text" name="subject" /> </label> 
</br> <label>Message <textarea name="message"></textarea> </label> 
</br><label>attachment <input type="file" name="my_file" /></label>
</br><label>Mail list <input type="file" name="lista" /></label>

</br> <label><input type="submit" name="button" value="Fire :)" /></label>
</form>

you can use the sleep() command to pause it

while (($line = fgets($list)) !== false) {

        if (!mail($line, $subject, $message, $headers)) 
        { 
            echo "Eroare! Nu am putut trimite mailurile."; 
        }
        else
        { 

            echo "Mailurile au fost trimise!"; 
        }

       sleep(3)
        }  

for example