I just don't understand this
if I put "\r\n" at the end of the lines it gives me emails like this with the header stuff printed in the email itself :
Content-type: text/html; charset=iso-8859-1
X-Priority: 1
Message-Id: <20070130065620.E1AA959CD@90plan.ovh.net>
Date: Tue, 30 Jan 2007 07:56:20 +0100 (CET)
X-Ovh-Remote: 213.186.36.178 (8.mail-out.ovh.net)
X-Ovh-Local: 213.186.33.29 (mx1.ovh.net)
X-Spam-Check: DONE|H 0.5/N
X-Antivirus: avast! (VPS 000708-1, 29/01/2007), Inbound message
X-Antivirus-Status: Clean
Un message envoyé par zed@dead.com
Téléphone 387387 38 7138 7318 7
r qeruqerhe rhqr hq erhqerh
Je souhaite réserver :
Chambre : PERALTA
Du : 5
Au : 5
Nuitées : 5
but it I just put "\n" at the ends of the lines it DOESN'T print the header information but I lose all the line breaks and it sends the email like this :
Un message envoyé par zed@dead.com Téléphone qeh tr qerh qerh qerh Je souhaite réserver : Chambre : DE SURGA Du : 3 Au : 3 Nuitées : 3
here's the php code that gives the second of the two results :
$to = 'xxx@xxx.com';
$subject = 'Un message de xxx.com';
$message = 'Un message envoyé par '.$_POST['nom']."\n\n";
$message .= 'Téléphone '.$_POST['tel']."\n\n";
if($_POST['message']!=""){
$message .= stripslashes(wordwrap($_POST['message'], 70))."\n\n";
}
if($roomsVar!=""){
$message .= "Je souhaite réserver : \n\n";
$message .= $roomsVar."\n\n";
}
$header = 'From: ' . $_POST['email'] . "\n";
$header .= "MIME-version: 1.0\n";
$header .= "Content-type: text/html; charset=iso-8859-1\n";
$header .= "X-Priority: 1\n";
$sm = mail($to,utf8_decode($subject),utf8_decode($message),$header);
has anyone got any idea how I can get round this problem ???????
thanks