Friday, 13 September 2013

how to format email body for the text send through php script

how to format email body for the text send through php script

Hello I have one contact us page, in which i have one textarea for the
description, there user will type his/her message. I want that message to
be send in mail body as it is with all the formatting in it. I am getting
description from php script
$header = "Content-type: text/html\n";
$Description = $_REQUEST["txtDescription"];
mail($To, $Subject, $Description, $header);
I have defined $To, $Subject, $header. Mail is going perfectly. I want
message to be displayed in mail body, as user typed in textarea with
formatting (like enter)

No comments:

Post a Comment