Ultra Posted July 8, 2008 Share Posted July 8, 2008 Hi, I'm sending customers a confirmation email of their orders on our site. The email is in plain text and has 4 columns - Item, Color, Quantity, Price, Subtotal. Now it took me a while to make sure they're all perfectly aligned (with whitespaces between the columns so they are spaced out), and each text of a column is not too long (truncate it in that case)... On my test server when I send those confirmation emails as a test they looked perfect in MS Outlook... Now that the site is online and we test preview those plain text message in Yahoo or Hotmail Accounts, the text/columns are totally out of sync... If sent in utf-8, they ignore if there is more then one whitespace after the words... If sent in iso-8859-1, some (extra) whitespaces are in place - but not all of them, still the matrix is out of sync... I know that it is possible though, as the confirmation emails I've been getting from Amazon.com for example are in plain text and the matrix (columns) work and are aligned. How do I do that ? Btw, I am using the standard php mail() function. Thanx for your help in advance !!! Mike Link to comment https://forums.phpfreaks.com/topic/113681-php-mail-plain-text-whitespace-issue/ Share on other sites More sharing options...
bluejay002 Posted July 8, 2008 Share Posted July 8, 2008 if the mail is read as html messages, then spaces after a space is not renderred. you may want to use instead. Link to comment https://forums.phpfreaks.com/topic/113681-php-mail-plain-text-whitespace-issue/#findComment-584221 Share on other sites More sharing options...
Bendude14 Posted July 8, 2008 Share Posted July 8, 2008 if it is a html mail you are sending you could also try using <pre> </pre> tags which preserve formatting or put the email inside a html table this would assure it will all align up Link to comment https://forums.phpfreaks.com/topic/113681-php-mail-plain-text-whitespace-issue/#findComment-584223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.