Cheryl Lander
asked on
formatting of text area in php mail
Hi All,
We have a form text area field below, but when we process the code, the body of the email does not appear the way it was entered in the form.
It should appear with line breaks, but instead it appears as one line of text.
Should appear like :
Hi Client,
Thanks for the meeting today.
Regards.
But appears like
Hi Client, Thanks for the meeting today. Regards.
Header
Email body
Any help would be appreciated.
We have a form text area field below, but when we process the code, the body of the email does not appear the way it was entered in the form.
It should appear with line breaks, but instead it appears as one line of text.
Should appear like :
Hi Client,
Thanks for the meeting today.
Regards.
But appears like
Hi Client, Thanks for the meeting today. Regards.
<textarea cols="45" rows="9" name="email_message_one">This message will go to the client.</textarea>
Header
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
if (!isset($_POST['email_message_one'])) $email_message_one = ''; else $email_message_one = $_POST['email_message_one'];
Email body
$email_message_one
Any help would be appreciated.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How are you entering it in the form? If you press 'enter' while you are in a form, it will submit the form, not create a line break.
ASKER
We have tried just hitting enter for each line, also by hitting Shift + Enter.
Same results.
All text comes out as one line.
We have looked into the suggestion that Loganathan has provided but are having trouble implementing it.
Same results.
All text comes out as one line.
We have looked into the suggestion that Loganathan has provided but are having trouble implementing it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.