<?php

if(isset($_REQUEST['email'])){

		$the_blogname   = "MJ:Wedding";				/* blog name: edit this line */
		$the_myemail 	= "domain@yourname.com";	/* email address: edit this line */
		$the_reception 	= $_REQUEST['reception'];
		$the_ceremony 	= $_REQUEST['ceremony'];
		$the_rehersal 	= $_REQUEST['rehersal'];
		$the_dinner 	= $_REQUEST['dinner'];
		$the_mealchoice = $_REQUEST['meal-choice'];
		$the_deserts 	= $_REQUEST['deserts'];
		$the_guest	 	= $_REQUEST['guest-number'];
		$the_child		= $_REQUEST['child-number'];
		$the_name	 	= $_REQUEST['name'];
		$the_email	 	= $_REQUEST['email'];
		$the_message 	= $_REQUEST['message'];

			$to      =  $the_myemail;
			$subject = "New RSVP from " . $the_blogname;
			$header  = 'MIME-Version: 1.0' . "\r\n";
			$header .= 'Content-type: text/html; charset=utf-8' . "\r\n";
			$header .= 'From:'. $the_email  . " \r\n";
			$message = "
			<a href='mailto:$the_email'>$the_name</a> added RSVP: <br/><br />$the_message <br />
			<br /><br />Reception:<br />$the_reception<br /><br />Ceremony:<br />$the_ceremony<br /><br />
			Rehersal:<br />$the_rehersal<br /><br />Dinner:<br />$the_dinner<br /><br />
			Meal Choice:<br />$the_mealchoice<br /><br />Deserts:<br />$the_deserts<br /><br />
			Number of Guests:<br />$the_guest<br /><br />Number of Child:<br />$the_child<br /><br />";
			
			if(@mail($to,$subject,$message,$header)) $send = true; else $send = false;

			if ($send)
			echo 'OK';
			else
			echo '<p style="color:red;">Message was not submitted.</p>'; 
			}
?>