farse Posted November 22, 2013 Share Posted November 22, 2013 This is too simple but I can't find the answer. I want to send multiple error messages in separate paragraphs in an email sent with mail(). I want to avoid using html. Here's what I tried as a test to see how to make separate paragraphs: mail('email@address', 'System Error','The error(s) relate to a purchase.nnPlease review the PayPal emails and IPN history to determine the correct status of the artwork./n/nMake whatever corrections to the database are needed.', 'FROM: email@address' ); and here's what I get: The error(s) relate to a purchase.nn Please review the PayPal emails and IPN history to determine the correct status of the artwork.nn Make whatever corrections to the database are needed. I'm not even getting a new line, let alone two so it seems inconsistent with the guidance in the Manual. I also tried rr and rn with no luck. Can I do what I am trying to do? Link to comment Share on other sites More sharing options...
justsomeguy Posted November 22, 2013 Share Posted November 22, 2013 If you are going to use escape sequences like n, then you need to use double quotes instead of single quotes to surround the string. Most escape sequences do not get converted in single-quoted strings. http://www.php.net/manual/en/language.types.string.php Link to comment Share on other sites More sharing options...
farse Posted November 22, 2013 Author Share Posted November 22, 2013 Details, details! Thank you. That works nicely. If I could just learn one new thing everyday... Farse Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now