Here I am trying to send the email with some text highlighted in bold. Here is what I have tried but I am getting the tags as it is but I am not getting the bold font. How can I do this?
Here is what I have done:
$mail->Body = PROPOSE_STATEMENT." <b>".$product_name."</b> ".REJECTED;
Here I have used the html <b></b>
tags in the php to make the text bold but I am getting output like this:
you proposed <b>TVS Apache RTR 160</b> Has been
You have to send an HTML Mail. Set to, subject and headers (Set HTML in header)
$to = '[email protected]';
$subject = 'Request';
$headers .= "MIME-Version: 1.0\r\n";
//Set the content-type to html
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
Now you can use HTML
$message = '<html><body>';
$message .= '<h1>Hello, World!</h1><b>bold</b>';
$message .= '</body></html>';
And send the Mail
mail($to, $subject, $message, $headers);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With