Why wp_mail() function isn’t sending any emails and displaying ‘0’ in Chrome ‘Network’ response

As this is an AJAX function your function must exit; or die(); after the final line of executed code, in this case outside of the if statement before the final }

However I don’t think this is the true issue, if you are getting a 0 returned in my experience it means the function is not running because admin-ajax.php returns 0 if it hits the end of the file and does not pick up your function.

Can you post the AJAX request?

Also for debugging (because your function doesn’t actually return anything at the moment), before the exit; or die(); you may want to add a response to check that your function is actually being executed, I usually use something like:

    header("Content-Type: application/json", true);
    echo json_encode( array("AJAX" => "Success") );