psquillace Posted April 9, 2008 Share Posted April 9, 2008 Hello All: I have a mail script set up as such: $to = '[email protected]'; $subject = 'Dance with CDA Registration Form'; $body = 'This is a registrant that filled out your form on your website' . '<br><br>'; $from = '[email protected]'; $body .= '<b>Registratnt First Name:</b>' . $_POST["Child_First_Name"] . '<br><br>'; $body .= '<b>Registratnt Last Name:</b>' . $_POST["Child_Last_Name"] . '<br><br>'; $body .= '<b>Registratnt First Name:</b>' . $_POST["Child_Age"] . '<br><br>'; However the email comes as one long line. Is there something I am doing wrong here? thanks for any help or advice, PM Link to comment https://forums.phpfreaks.com/topic/100251-solved-line-breaks-not-breaking-in-email/ Share on other sites More sharing options...
awpti Posted April 9, 2008 Share Posted April 9, 2008 Probably getting sent as html. Change the ' '; to '<br />'; Or better: $to = '[email protected]'; $from = '[email protected]'; $subject = 'Dance with CDA Registration Form'; $body = 'This is a registrant that filled out your form on your website<br /><br />'; $body .= "Registrant First Name: {$_POST['Child_First_Name']}<br />"; $body .= "Registrant Last Name: {$_POST['Child_Last_Name']}<br />"; $body .= "Registrant Age: {$_POST['Child_Age']}<br />"; you may need to set the content-type if you want it to be plain-text, and if so - change the <br /> to \r\n Link to comment https://forums.phpfreaks.com/topic/100251-solved-line-breaks-not-breaking-in-email/#findComment-512588 Share on other sites More sharing options...
psquillace Posted April 9, 2008 Author Share Posted April 9, 2008 Thanks AWPTI it worked with a concatenate on the end and a \r\n\r\n for 2 line breaks. now, how would I bold the titles like Reg Name: Reg Age Inside the ' ' single quotes? Link to comment https://forums.phpfreaks.com/topic/100251-solved-line-breaks-not-breaking-in-email/#findComment-512604 Share on other sites More sharing options...
ohdang888 Posted April 9, 2008 Share Posted April 9, 2008 '<b> reg name </b>' but only if the user allows html come in from an email. Link to comment https://forums.phpfreaks.com/topic/100251-solved-line-breaks-not-breaking-in-email/#findComment-512612 Share on other sites More sharing options...
discomatt Posted April 9, 2008 Share Posted April 9, 2008 In order to bold you must use rich-text or HTML-based email. Link to comment https://forums.phpfreaks.com/topic/100251-solved-line-breaks-not-breaking-in-email/#findComment-512614 Share on other sites More sharing options...
psquillace Posted April 9, 2008 Author Share Posted April 9, 2008 Oh ok... well I will just leave it and count my blessings that I got this far and got it to work. LOL thanks for all your help, Paul Link to comment https://forums.phpfreaks.com/topic/100251-solved-line-breaks-not-breaking-in-email/#findComment-512619 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.