
<?php



             



////////////////////////////////////////
// EMAIL #1 (CONTACT FORM NOTIFICATION)
////////////////////////////////////////
// Target email addresses for send
// $to_email = "paul@mindstar.com, elizabeth@mindstar.com"; 
// $to_email = "paul@mindstar.com"; 
// $to_email = "formsubmit@caringcouples.com"; 


$to_email = "formsubmit@caringcouples.com"; 







//////////////////////////////////////
// THE EMAIL SUBJECT LINE
//////////////////////////////////////

$subject = "Caring Couples, Happy Lives - Contact Form";










//////////////////////////////////////
// GET THE TIME
//////////////////////////////////////
// This prints at the top of the "Success" Thank you HTML page (not good!) 
// But this does show how to define dates and time in different formats
// You can use these as templates to show how to define $ variables (see $d and $t below)
// Then make sure you include them in the $message part below
//
// print date("m/d/y",$b) . "<br>";
// print date("D, F jS",$b) . "<br>";
// print date("l, F jS Y",$b) . "<br>";
// print date("g:i A",$b) . "<br>";
// print date("r",$b) . "<br>";
// print date("g:i:s A D, F jS Y",$b) . "<br>";




// Define $b (generic time)

$b = time ();



// Use $b to create nicely formated date and time variables 
// To include in $message below

$d = date("l, F jS Y",$b);
$t = date("g:i A",$b);














//////////////////////////////////////
// CREATE THE EMAIL BODY ($message)
//////////////////////////////////////
// "--------------------------------------------------- 
// Caring Couples, Happy Lives Counseling Contact Form 
// --------------------------------------------------- 

$message = 
"------------------------------------------------------------------------------------------ 
Caring Couples, Happy Lives - Counseling Contact Form 
------------------------------------------------------------------------------------------ 
$d  $t
---

First Name: $FirstName 
Last Name: $LastName 

EMail Address: $EMail 

Home Phone: $HomePhone 
Cell Phone: $CellPhone 
Work Phone: $WorkPhone 

Interest: $Interest 

Action: $Action 

Office Location: $OfficeLocation 

Referring Media: $ReferringMedia 

Message: $Details " ;








//////////////////////////////////////
// SEND THE EMAIL
//////////////////////////////////////



$headers=("");
$headers .= "From: <$EMail>\n";
$headers .= "X-Sender: <$EMail>\n";
$headers .= "X-Mailer: PHP\n"; //mailer

$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=utf-8\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";

$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Return-Path: <$EMail>\n";



// $headers = 'From: webmaster@example.com' . "\r\n" .
//    'Reply-To: webmaster@example.com' . "\r\n" .
//    'X-Mailer: PHP/' . phpversion();



//        $headers .= "MIME-Version: 1.0\n";
//        $headers .= "Content-Type: text/plain; charset=utf-8\n";
//        $headers .= "Content-Transfer-Encoding: 8bit\n";
//
//        mail($to, $subject, $content, $headers,'-f '.$administrator_email_address);*/

    



$to_email="paul@itxdesign.com";

mail($to_email, $subject, $message, $headers);









//////////////////////////////////////
//EMAIL #2 (list sign-up)  
//////////////////////////////////////
// Note you can send a 2nd email by copying the above from $to_email down to mail( )
// Target email addresses for send










///////////////////////////////////////////////
// LOAD THE THANK YOU PAGE AFTER SENDING EMAIL
///////////////////////////////////////////////

include("http://www.caringcouples.com/contact_thankyou.html");

   





?>
