Can anyone please tell me why I am getting spaces instead of newlines in this code where I use \n?
Code PHP:<?php $mail_recipient = "Jeremywoods@xtra.co.nz"; $mail_subject = "Enquiries"; $Name = Trim(stripslashes($_REQUEST['Name'])); $Email = Trim(stripslashes($_REQUEST['Email'])); $Company = Trim(stripslashes($_REQUEST['Company'])); $Address = Trim(stripslashes($_REQUEST['Address'])); $Phone = Trim(stripslashes($_REQUEST['Phone'])); $Comments = Trim(stripslashes($_REQUEST['Comments'])); $Body = ""; $Body .= $Name. "\n"; $Body .= $Email. "\n"; $Body .= $Company. "\n"; $Body .= $Address. "\n"; $Body .= $Phone. "\n"; $Body .= $Comments. "\n"; $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // send email $success = mail($mail_recipient, $mail_subject, $Body, $headers); if($success==true) { echo "Your mail has been Sent Successfully";} else {echo "Your mail has Not Sent Successfully";} ?>




Bookmarks