Advanced email form+php (wrong message output)

hey everybody!

For my project I made a form using flash and a php file to send the email.
This is my first attempt on PHP and my script works but it sends the variables totally wrong into the mailbox.
I tried everything to make it work and it is driving me crazy!!! :jail:
The form has to send my vars from flash to my own mailbox and the mailbox of the user whos mailing me.

I faced some problems:

  1. You can see when looking at the code below and looking to the message i miss some information in the mail! It doesnt send the first 4 vars into the message!

  2. As you can see below the message shows an email addres from the host and i’d like to change that into my own.

  3. I dont really think this is a safe code to send the mail cause i dont really like to get my inbox full of spam

  4. Some mail clients see this as spam and put it into the unwished email folder so nobody will see this mail.

Hopefully somebody knows to solve some of those issues
Please help me out with this!
And I hope to get some explanation with it to understand it in the future…

Greetings
Dylan

Message:

Van: <anonymous@eudoris.gvs.nl>
Verzonden: donderdag 8 december 2005 10:27:35
Aan: leenvdhoek@hotmail.com
Onderwerp: Gaswacht Service abonnement

Tel. nr.: 2312313

Merk: qweqwe
Type: qweqweqweqweqwwqeqqew
Bouwjaar: 1985
Abonnement: Mechanische ventilatie box - Incl.
Abonnement extra: Mechanische ventilatie box - Excl.
Ingangsdatum: 26/12/2005

Betaalmethode: Elk jaar vooraf betalen.
Bank/giro nr.:

Opmerkingen: eqweqwe

supr1mer35@hotmail.com

<?php
 
$sendTo = "leenvdhoek@hotmail.com";
$cc= $_POST["email"];
$subject = "Gaswacht Service abonnement";
 
 
$headers = "Van: " .$_POST["email"]."<" . $_POST["email"] .">
";
$headers .= "Antwoord naar: " . $_POST["email"] . "
";
$headers .= "Terugkeren: " . $_POST["email"];
 
$message .= "Naam: ".$_POST["naam"]."
";
$message .= "Adres: ".$_POST["adres"]."
";
$message .= "Postcode: ".$_POST["postcode"]."
";
$message .= "Woonplaats: ".$_POST["woonplaats"]."
";
$message .= "Tel. nr.: ".$_POST["telefoon"]."
";
$message .= "
";
$message .= "Merk: ".$_POST["merk"]."
";
$message .= "Type: ".$_POST["type1"]."
";
$message .= "Bouwjaar: ".$_POST["bouwjaar"]."
";
$message .= "Abonnement: ".$_POST["abonnement"]."
";
$message .= "Abonnement extra: ".$_POST["extra"]."
";
$message .= "Ingangsdatum: ".$_POST["ingang"]."
";
$message .= "
";
$message .= "Betaalmethode: ".$_POST["choice"]."
";
$message .= "Bank/giro nr.: ".$_POST["giro"]."
";
$message .= "
";
$message .= "Opmerkingen: ".$_POST["opmerkingen"]."
";
 
mail($sendTo, $subject, $cc, $message, $headers);
 
print "&success=1&"
 
?>