title: PHP email script with server name
body: <p>I have an email script that works fine on my server but when I put it on another apperently I need to change the server name from localhost to their name they have. The email script I have doesn't have a server name and I was wondering how I would do this? below is the script...</p>
  
  <pre><code>&lt;?PHP
  $email = $_POST["emailaddress"];
  $firstname = $_POST["firstname"];
  $lastname = $_POST["lastname"];
  $zipcode = $_POST["zipcode"];
  $feedback = $_POST["feedback"];
  $date=date("d-m-Y");
  
  $to = "";
  $subject = "New Feedback Received";
  
  $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  $headers .= "From: $email\n";
  
  $message = "
  
  &lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
  
  A visitor to your website has left the following feedback; &lt;br /&gt;&lt;br /&gt;
  Date: $date &lt;br /&gt;
  First Name: $firstname &lt;br /&gt;
  Last Name: $lastname &lt;br /&gt;
  Zip Code: $zipcode &lt;br /&gt;
  Email Address: $email &lt;br /&gt;
  Feedback: $feedback &lt;br /&gt;
  
  &lt;img src=\"" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  ";
  $user = "$email";
  $usersubject = "Thank You";
  
  $userheaders = 'MIME-Version: 1.0' . "\r\n";
  $userheaders .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  $userheaders .= "From: info@westmorelandberryfarm.com\n";
  $usermessage =
  "
  &lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
  Thank you for your feedback, your comments are important to us.
  &lt;br /&gt;&lt;br /&gt;
  We hope to see you at the Farm very soon!
  &lt;br /&gt;&lt;br /&gt;
  &lt;br /&gt;
  Tel:  &lt;br /&gt;
  &lt;a href=\""&lt;/a&gt;&lt;br /&gt;
  &lt;img src=\"" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  ";
  
  mail($to,$subject,$message,$headers);
  mail($user,$usersubject,$usermessage,$userheaders);
  $fh = fopen("feedback.txt", "a");
  fwrite($fh, "Date:$date\r\nFirst Name:$firstname\r\nLast Name:$lastname\r\nEmail:$email\r\nZip   Code:$zipcode\r\nFeedback:$feedback\r\n \r\n");
  fclose($fh);
  ?&gt;
  </code></pre>