Ajax form not responding

I am doing an ajax form submission. Here is the code

$(document).ready(function () {
    // ----  -----
    var options = {
        // ,       
        target: "#output",
        // beforeSubmit: showRequest, // ,    
        success: showResponse,
        // ,    
        timeout: 100 // -
    };
    //   submit  
    $('#form1').submit(function () {
        $(this).ajaxSubmit(options);
        // !!!  !!! 
        //   false,   
        //   (   form.php) 
        return false;
    });
    // ----  -----
});

In the form’s response file, I submit the mail and return a success response. If you turn off the send mail function, everything works fine. If I turn it on, it writes

POST http://domain.com/form.php Aborted.

There are no errors in php and Apache. I don’t know where to dig already.

Form.php file

require_once 'class/mail.php'; 
if(!empty($_POST['name']))
{
    $text = $_POST['mes'].": ".$_POST['tel']."  ".$_POST['name']."  ".$_POST['kom'];
    if(My_Mail($text))
    {
        $suff = "    ";
        echo $suff;
        return 0;
    }else
    {
        echo "  ";
    } 
}

Answer 1

Closed issue. It was interrupted by a timeout… it took a long time to send mail.