marynorn
02-08-2008, 01:51 PM
I have a form that sends out an autoreply, but at the moment it's just text. I'd like it to display an image at the top, and use a better font than the default. Every time I try to edit the autoreply, I end up with error messages, so any help here would be appreciated.
<?php
$to = "repairs@myemail.co.uk" ;
$name = $_REQUEST['name'] ;
$headers = "From: " . $_REQUEST['email'] . "\n" ;
$subject = "Repair Request Form";
$from = $_REQUEST['email'] ;
$fields = array();
$fields{"name"} = "Tenant Name";
$fields{"houseNumber"} = "House Name";
$fields{"address1"} = "Address Line 1";
$fields{"address2"} = "Address Line 2";
$fields{"address3"} = "Address Line 3";
$fields{"postcode"} = "Postcode";
$fields{"optone"} = "Type of Repair";
$fields{"opttwo"} = "Problem";
$fields{"details"} = "Details of Problem";
$fields{"email"} = "E-mail Address";
$fields{"dayphone"} = "Daytime Phone Number";
$fields{"mobphone"} = "Mobile Phone Number";
$fields{"mondayam"} = "Monday AM Repair";
$fields{"tuesdaypm"} = "Tuesday PM Repair";
$fields{"wednesdaypm"} = "Wednesday PM Repair";
$fields{"thursdayam"} = "Thursday AM Repair";
$fields{"fridayam"} = "Friday AM Repair";
$fields{"accessarrangements"} = "Access Arrangements";
$body = "Repair Request Information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$headers2 = "From: repairs@myemail.com";
$subject2 = "Thank you for contacting us";
$autoreply = "Thank you for using our On Line Repairs Service. The details of your request are listed below, and we will contact you within one working day to arrange your repair.\n\n"; foreach($fields as $a => $b){ $autoreply .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
?>
<?php
$to = "repairs@myemail.co.uk" ;
$name = $_REQUEST['name'] ;
$headers = "From: " . $_REQUEST['email'] . "\n" ;
$subject = "Repair Request Form";
$from = $_REQUEST['email'] ;
$fields = array();
$fields{"name"} = "Tenant Name";
$fields{"houseNumber"} = "House Name";
$fields{"address1"} = "Address Line 1";
$fields{"address2"} = "Address Line 2";
$fields{"address3"} = "Address Line 3";
$fields{"postcode"} = "Postcode";
$fields{"optone"} = "Type of Repair";
$fields{"opttwo"} = "Problem";
$fields{"details"} = "Details of Problem";
$fields{"email"} = "E-mail Address";
$fields{"dayphone"} = "Daytime Phone Number";
$fields{"mobphone"} = "Mobile Phone Number";
$fields{"mondayam"} = "Monday AM Repair";
$fields{"tuesdaypm"} = "Tuesday PM Repair";
$fields{"wednesdaypm"} = "Wednesday PM Repair";
$fields{"thursdayam"} = "Thursday AM Repair";
$fields{"fridayam"} = "Friday AM Repair";
$fields{"accessarrangements"} = "Access Arrangements";
$body = "Repair Request Information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$headers2 = "From: repairs@myemail.com";
$subject2 = "Thank you for contacting us";
$autoreply = "Thank you for using our On Line Repairs Service. The details of your request are listed below, and we will contact you within one working day to arrange your repair.\n\n"; foreach($fields as $a => $b){ $autoreply .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
?>