pauldreed Posted November 9, 2006 Share Posted November 9, 2006 I have a php contact page form which sends enquiries to my email account and also a confirmation email to the sender, telling them that I will respond in due course.This works great, but how can I introduce a line break/new paragraph into the automated email, so the email looks formatted and not just a long string of words??[code]# send confirmation email if($sendnotification == true) { $notification_message = "Thank you for contacting $websitetitle, $sender_name. We have received your email and will be in touch shortly"; $notification_subject = "Thanks for your message to $websitetitle."; mail($sender_email, $notification_subject, $notification_message, "From: $recipient"); header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?success'); }[/code] Link to comment https://forums.phpfreaks.com/topic/26762-email-line-breaks/ Share on other sites More sharing options...
haaglin Posted November 10, 2006 Share Posted November 10, 2006 \n - Newline. "this is some text\n this is on a new line"Works only in double quotes. Link to comment https://forums.phpfreaks.com/topic/26762-email-line-breaks/#findComment-122377 Share on other sites More sharing options...
pauldreed Posted November 10, 2006 Author Share Posted November 10, 2006 haaglinThanks, that works great, are you aware of any other formatting options that I could use? Link to comment https://forums.phpfreaks.com/topic/26762-email-line-breaks/#findComment-122820 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.