<?php
	
	$name = $_POST['sf-name'];
	$email = $_POST['sf-email'];
	
	$formcontent="Name: $name\n\nEmail: $email";
	
	// Enter the email where you want to receive the notification when someone subscribes
	$recipient = "sainath.chillapuram@hotmail.com";
	
	$subject = "New Subscriber!";
	
	$mailheader = "From: $email\\r\\n";
	$mailheader .= "Reply-To: $email\\r\\n";
	$mailheader .= "MIME-Version: 1.0\\r\\n";
	
	$success = mail($recipient, $subject, $formcontent, $mailheader);
	
	if ($success == true){
	
?>
	
	<script language="javascript" type="text/javascript">
		alert('Thank you for subscribing.');
		window.location = "../index.html";
	</script>
	
<?php
	
	} else {
	
?>

    <script language="javascript" type="text/javascript">
		alert('Message not sent.');
		window.location = "../index.html";
    </script>
	
<?php

    }
	
?>