Email with contents


#1

I have a contact form which on submit goes to a confirmation page. above the html tags is the following

<?php
$senderEmail = $contEmail;
	$senderRecip = $senderEmail;
	$senderSubject = $contSubject;
	$senderMsg = $_POST[contEnquiry];
	$headers = "From: $_POST[contName] <$_POST[contEmail]> n";
	$headers .= "Reply-To: $_POST[contEmail]";
	mail($senderRecip, $senderSubject, $senderMsg, $headers);
?>	


I have tested it and its working fine.

I want to add a header and footer to the page that is sent, how would I go about doing this

Andy


#2

I suppose its just knowing where to look sometimes!!
Heres The Code

[code]

<?php $name = $_POST["contName"]; $email = $_POST["contEmail"]; $mime_boundary = "Sur Y Sol".md5(time()); $sender = "$email"; $senderSubject = $contSubject; $senderHeaders = "From: Enquiries <$apEnquiry>n"; $senderHeaders .= "Reply-To: Enquiries <$apEnquiry>n"; $senderHeaders .= "MIME-Version: 1.0n"; $senderHeaders .= "Content-Type: multipart/alternative; boundary="$mime_boundary"n"; $senderMsq = "--$mime_boundaryn"; $senderMsq .= "Content-Type: text/plain; charset=UTF-8n"; $senderMsq .= "Content-Transfer-Encoding: 8bitnn"; $senderMsq .= "$name:nn"; $senderMsq .= "This email is to confirm that surysol.com has received your enquiry.n"; $senderMsq .= "One of our representatives will be in touch shortly.nn"; $senderMsq .= "Thank You.nn"; $senderMsq .= "--$mime_boundaryn"; $senderMsq .= "Content-Type: text/html; charset=UTF-8n"; $senderMsq .= "Content-Transfer-Encoding: 8bitnn"; $senderMsq .= "n"; $senderMsq .= "n"; $senderMsq .= "$name:
n"; $senderMsq .= "
n"; $senderMsq .= "This email is to confirm that $siteName has received your enquiry.
n"; $senderMsq .= "One of our representatives will be in touch shortly.
nn"; $senderMsq .= "
n"; $senderMsq .= "Thank You.


nn"; $senderMsq .= ""; $senderMsq .= "Your Enquiry.


nn"; $senderMsq .= $contEnquiry; $senderMsq .= "n"; $senderMsq .= "n"; $senderMsq .= "n"; $senderMsq .= "--$mime_boundary--nn"; ?> [/code]