Sunday, December 27, 2009

Emails display as Html coding?

hello,





i am providing a email form in my web site. it works well. and i have inserted a rich text box for its ';body';.





But my problem is, When i email a formated text (bold,colored...etc) the emailed content appears as a coding in the receivers page. ( not as the formated text i emailed)





i dont know how to resolve this since i have no knoledge about it.





please can somebody help me about this matter? Please tell me how to edit the script. if somebody can tell me where to edit the bellow script and what i should include, i would be greatful








thanks





sisiraEmails display as Html coding?
PHP defaults to plain text when sending mail. You have to specify the content type as html in the header.





This is what you put in the header:


'Content-type: text/html; charset=iso-8859-1'





The complete header would be:





$headers = ';From: '; . $from . ';\n'; .


';To: '; . $to . ';\n'; .


';CC: '; . $cc . ';\n'; .


';BCC: '; . $bcc . ';\n'; .


';Content-type: text/html; charset=iso-8859-1';;

No comments:

Post a Comment