Sending mail is not working in Chrome and IE

I’m just developing a new site on Wordpress. I’m using a free template and there is no support so I hope to get help here.

I’m having problems with the contact form on this site:

I’m using Firefox and everything works great. But now I tried to send this form with Chrome and IE and it goes to 404 page. And I also got reports that some other people can’t send it also with FF. How can this be?
Since the form is using Javascript I think the problem could be somewhere there.

I post the codes below. I have only translated the texts, no more changes. Maybe some of you will spot what could be wrong. Or maybe is the error somewhere else. Please try to write me from this form and see it it works.

Code from contact.php:

//Template Name: Contact Page
get_header() ?>
<div class="container">
		<header class="title">
			<h2><?php the_title() ?></h2>
		<?php while ( have_posts() ) : the_post(); ?>
		<div class="post">	
					<?php the_content() ?>
				<div class="social-links">
					<a href="<?php echo get_option('fb_id'); ?>" class="facebook">
						<i class="icon-facebook"></i>
					<a href="<?php echo get_option('twitter_id'); ?>" class="twitter">
						<i class="icon-twitter"></i>
					<a href="<?php echo get_option('gplus_id'); ?>" class="google">
						<i class="icon-google-plus"></i>
					<a href="<?php echo get_option('linkedin_id'); ?>" class="linkedin">
						<i class="icon-linkedin"></i>
				<div class="contact-form">
				<h2>Kirjuta mulle</h2>
					<article style="display: none" id="sent-message">
						<h2>Sinu kiri läks teele</h2>
						<p>Aitäh sulle! Vastan esimesel võimalusel.</p>
					<article style="display: none" id="error-message">
						<h2>Oioi, midagi läks valesti, sinu kiri ei läinud teele.</h2>
						<p>Palun proovi uuesti ja täida kõik väljad.</p>
					<form id="ajaxContact">
							<input name="name" type="text" placeholder="Nimi" required/>
							<input name="email" type="email" placeholder="E-posti aadress" required/>
							<input name="subject" type="hidden"  value="Kiri lehelt"/>
						<textarea name="message"></textarea>
						<input type="hidden" name="contact_email" value="<?php print get_option('contact_email')?>"/>
						<input type="submit" class="submit" value="Saada" />
				<?php endwhile; ?>
	<script type="text/javascript">
					$('#ajaxContact').submit(function() {
						if ($("#ajaxContact").valid() == false){
							return false;
						// got event!!
						$("#ajaxContact").fadeTo("slow", 0.33);
								type: "POST",
								url: "<?php echo get_template_directory_uri() ?>/mailsend.php",
								data: $(this).serialize(),
								success: function(data) {
									if (data == "true"){
										// msg sent...
										// cannot sent msg
								return false;
<?php get_footer() ?>

Code from mailsend.php:

	if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
		$msg ="A new message from: " . $_POST[name] ."<br />" . $_POST['message'];
		$to =  $_POST['contact_email'];
		$subject = $_POST['subject'];
		$from = $_POST['email'];
		$headers  = "From: $from\\r\
" ;
		$headers .= 'MIME-Version: 1.0' . "\\r\
		$headers .= 'Content-type: text/html; charset=UTF-8' . "\\r\
		$headers .= "X-Mailer: PHP" . phpversion();
		if (@mail($to, $subject, $msg, $headers)){
			echo "true";
			echo "false";