ajax return full html code example
Example: ajax response returns entire page
Use condition to verify if $_POST empty in you main page or index.php to not send the whole page in response ajax
and verif your AJAX URL
$.ajax({
type:"POST",
url:"http://mywebsite.com/php/send_email.php",
.......
index.php
------------------------
<?php
if(empty($_POST)){ ?>
//
<html>
the header pages
the body
the include pages
the scripts pages
the footer
<?php } ?>