how to bold text in php mail

Asked By Olusegun A.
24-Aug-10 06:44 AM
Earn up to 0 extra points for answering this tough question.

Hello friends

Am having problem bolding my text or applying other styles to my mail content. eg

<?php

$message= "Name: <b>$name</b>";

?>

the message always appear in the receivers box as

Name: <b>James</b> instead of

Name: James


What do i do?

  re: how to bold text in php mail

Web Star replied to Olusegun A.
24-Aug-10 07:05 AM
you need to use custome font in php as in this article
http://iluvjohn.com/welcome-to-iluvjohn/custom-fonts-on-a-website-with-php-704/

  re: how to bold text in php mail

Super Man replied to Olusegun A.
24-Aug-10 08:24 AM

<?php

// multiple recipients

$to  = 'aidan@example.com' . ', '; // note the comma

$to .= 'wez@example.com';

 

// subject

$subject = 'Birthday Reminders for August';

 

// message

$message = '<b> Happy birthday </b>';

 

// To send HTML mail, the Content-type header must be set

$headers  = 'MIME-Version: 1.0' . "\r\n";

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

 

// Additional headers

$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";

$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";

$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";

$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

 

// Mail it

mail($to, $subject, $message, $headers);

?>

  re: how to bold text in php mail

DlennartD DlennartD replied to Super Man
15-Oct-10 08:30 AM
TGHDF
  re: how to bold text in php mail
DlennartD DlennartD replied to Super Man
15-Oct-10 08:33 AM
This isn't working if you want to combine bold text with a variable like this:

Name: <b>$name</b>

Any idea how to solve this?
Create New Account