302暂时移动15ms

i have following php code

      if(mail($ToEmail, $Subject, $Content, $Headers) == false) {
         echo "Error While Sending Email to : ".$ToEmail;
         }else{ 
         echo "Email Send Successfully to: ".$ToEmail; ;
         }

i call this php code from jquery like this

       var uemail="abc@domain.com,xyz@domain.com,gty@domain.com";

         uemail = uemail.split(',');

var interval;
var counter = 0;
var check = function() { 
                        if(counter < uemail.length) {
                            // Send email post 
                            counter++; 
                        } else {
                            clearInterval(interval);
                        }
            };

interval = setInterval(check,10000);

after 2nd time execution its shows 302 Moved Temporarily 15ms in firebug and user loogoff

Thanks

The error that you're getting is thrown client side when the AJAX callback method does not receive the response it expected.

If there is a timeout then a 302 will be thrown by AJAX. I believe anything other than a 200 response triggers a 302 too.

To test what is wrong try adding something similar to this in your JavaScript:

if(responseText.indexOf('<body') != -1) {

// a 302 redirection happened
}