.php联系表单提交但不发送

I am currently putting together a very simple contact form for a site I'm working on but for some reason, my normal go to form doesn't want to work. The php is as follows:

    <?php
    // Check for HTML in comment
    function screen_form($ary_check_for_html)
    {
    // check array - reject if any content contains HTML.
    foreach($ary_check_for_html as $field_value)
    {        
    if(is_array($field_value))
    {
    foreach($field_value as $field_array)  // if the field value is an array, step through it
    {
    $stripped = strip_tags($field_array);
    if($field_array!=$stripped) 
    {
    // something in the field value was HTML
    return false;
    }
    }
    } else {
    $stripped = strip_tags($field_value);
    if($field_value!=$stripped) 
    {
    // something in the field value was HTML
    return false;
    }
    }
    }
    return true;
    }

    # Catcher for errors
    $FORM_ERROR = array();
    $SUCCESS = false;
    $resp = null;

    # Check for form processing
    if($_POST) {
    # Little bit of safety checking....
    # Added to try and halt spam....
    sleep(1);

    if(!$_POST['gonzo']) {
    die('No spam thank you.');
    }

    if(!screen_form($_POST)) {
    sleep(5);
    die('No HTML in forms thank you.');
    }

    $form_init = base64_decode($_POST['gonzo']);
    $now = time();
    $diff = $now - $form_init;

    if($form_init > $now || $diff > 1800) {
    die('Attempt failed - Please retry.');
    }

    $stamp = date('d-m-Y H:i:s', $form_init);

    # Validate submission....
    if(!$_POST['name']) {
    array_push($FORM_ERROR, 'name');
    }
    if(!$_POST['email']) {
    array_push($FORM_ERROR, 'email');
    }
    if(!$_POST['telephone']) {
    array_push($FORM_ERROR, 'telephone');
    }
    if(!$_POST['message']) {
    array_push($FORM_ERROR, 'message');
    }

    if(count($FORM_ERROR) < 1) {
    # Escape our values
    $name = htmlspecialchars($_POST['name']);
    $email = htmlspecialchars($_POST['email']);
    $telephone = htmlspecialchars($_POST['telephone']);
    $message = htmlspecialchars($_POST['message']);

    $msg = <<<EOF
    <h3>Contact Form Submission ($stamp)</h3>
    <table>
    <tr>
    <td><strong>Name</strong></td>
    <td>$name</td>
    </tr>
    <tr>
    <td><strong>Email</strong></td>
    <td>$email</td>
    </tr>
    <tr>
    <td><strong>Tel</strong></td>
    <td>$telephone</td>
    </tr>
    <tr>
    <td><strong>Message</strong></td>
    <td>$message</td>
    </tr>
    </table>
    EOF;
    $headers = "From: postmaster@DOMAIN.co.uk
";
    $headers .= "Content-Type: text/html
";

    # Sent email 
    mail("EMAIL", "EMAIL TITLE", $msg, $headers);

    $SUCCESS = true;
    }
    }
    ?>

The form works fine and errors when it should and also it completes through to tell me the form has been sent but it doesn't send to the email address or any other im trying? Any thoughts would be most welcome on this. Here is the form code:

    <form action="contact" method="post" id="contact_form">
            <?php
                if($SUCCESS) {
            ?>
            <div class="alert alert-success" role="alert">
                <p>Thank you, the form has been successfully submitted.</p>
                <p>We will be in touch as soon as possible with regards to your enquiry.</p>
            </div>
            <?php
                }
                else {
            ?>
            <p>Please Note: Fields Marked with a <span class="req">*</span> are required</p>
            <div class="form-group">
                <label form="name">Name <span class="req">*</span> <?php if(in_array('name', $FORM_ERROR)) print '<div class="req"><i class="fa fa-exclamation-triangle"></i> This field below is required!</div>'; ?></label>
                <input class="form-control" type="text" name="name" tabindex="1" placeholder="Joe">
            </div>

            <div class="form-group">
                <label form="email">Email <span class="req">*</span> <?php if(in_array('email', $FORM_ERROR)) print '<div class="req"><i class="fa fa-exclamation-triangle"></i> This field below is required!</div>'; ?></label>
                <input class="form-control" type="text" name="email" tabindex="2" placeholder="joe.bloggs@example.com">
            </div>

            <div class="form-group">
                <label form="telephone">Telephone <span class="req">*</span> <?php if(in_array('telephone', $FORM_ERROR)) print '<div class="req"><i class="fa fa-exclamation-triangle"></i> This field below is required!</div>'; ?></label>
                <input class="form-control" type="text" name="telephone" tabindex="3" placeholder="1234567890">
            </div>

            <div class="form-group">
                <label form="message">Message <span class="req">*</span> <?php if(in_array('message', $FORM_ERROR)) print '<div class="req"><i class="fa fa-exclamation-triangle"></i> This field below is required!</div>'; ?></label>
                <textarea class="form-control" name="message" tabindex="4" col="25" row="12" placeholder="I would like to discuss..."></textarea>
            </div>

            <div class="form-check">
                <p>By submitting this form you understand and agree to the <a href="terms">terms</a> set out on this website.</p>
            </div>

            <p>
                <input type="hidden" name="gonzo" value="<?php echo(base64_encode(time())); ?>">
                <button name="submit" type="submit">Submit Form</button>
            </p>
            <?php
                }
            ?>
        </form>