Hi every one. i m sending mail in php and facing a problem

the problem is
when i add some text in the body like this
<b>this text is bold</b>
then this text is shown as it is
in the mail
i want to show this text bold
The problem here is that the tags do not apply and are shown as it is.

Please tell me the solution.

Thanks in advance

Recommended Answers

All 2 Replies

Member Avatar

Hi adcodingmaster,

It sounds like you are sending a plain text email.
To send it in HTML format, add this header

$headers .= "MIME-Version: 1.0" . "\r\n" . "Content-type:text/html;charset=iso-8859-1" . "\r\n";

This will add the correct text to the variable called $headers (it will not replace it). Change this variable name if needed.

Hope this helps.

perfect answer. that has solved my problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.