field alignment in email from html submssion form posted via php

Using a simple html submission form that post to a php file.
All working correctly but the field alignment in the email is quite random?
I am looking for a fix that will left align all text?

The current php:-

[php] $to = "[email protected]";
$from = $_REQUEST[‘Email’] ;
$name = $_REQUEST[‘Name’] ;
$headers = “From: $from”;
$subject = “Web Contact Form”;

$fields = array();
$fields{“Name”} = “Name”;
$fields{“Company”} = “Company”;
$fields{“Telephone”} = “Telephone”;
$fields{“Email”} = “Email”;
$fields{“Enquiry”} = “Enquiry”;

$body = “Web Contact Form has been used with the following information:\n\n”; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

$headers2 = “From: [email protected]”;
$subject2 = “Thank you for contacting us”;
$autoreply = “Thank you for contacting us. Somebody will get back to you as soon as possible, usually within 24 hours.”;

if($from == ‘’) {print “You have not entered an email, please go back and try again”;}
else {
if($name == ‘’) {print “You have not entered a name, please go back and try again”;}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( “Location: http://www.xxxxxxxxx.com/thankyou.html” );}
else
{print “We encountered an error sending your mail, please notify [email protected]”; }
}
}
?>

[/php]
Email looks like this (field alignment is all over the place):-

Web Contact Form has been used with the following information:

           Name: Any Name
        Company: Any Company
      Telephone: 123456789
          Email: [email protected]
        Enquiry: Any Enquiry

Some help would be appreciated.

Why are you putting the space in there?

Here is a generic pattern I have used for form processing.

form='';
 foreach($_POST as $key => $value){
$form.= ucwords(str_replace("_", " ", $key));
$form.=": " . $value;
$form.="\r\n";
} 
Sponsor our Newsletter | Privacy Policy | Terms of Service