I’m using the code below to store checkbox items in a MySQL database. The 3rd line down is where I need to put a line break between each item. I tried <br> or <br /> and even though it looks great on the screen in the standard page, it actually shows the <br> or <br /> html in the email receipt and does NOT do a line break.
for ($i=0; $i<count($_POST['swatchname']);$i++) {
$swatchname.= $_POST['swatchname'][$i];
$swatchname.="<br />";
}
In my javascript to send the email I have been using \n to do line breaks in the emails and it works perfectly.
Question is.. what method or character would I use to see it correctly in both email and on standard html page? I don’t want to list the items with a comma between. Client needs it listed.
Have you changed the headers for the email so the email client understands it as a html document instead of a common text format?
Adding content headers makes the email act like a html page but just a email so the client can view a stylised email
Edit: some email clients don’t accept html as the content type but most of the major ones do