Jump to content

Email send in HTML?


extrovertive

Recommended Posts

This email is just going to be send to one person who has HTML enbabled in their email.

In my $message variable to be used in the mail() function, I have
(ignore the spaces between the tag)
$message = "
< b > Username: </ b > $tutorname
< b > Title: </ b > $tutortitle
< b > First name: </ b > $tutorfirstname
";

Now, when sending it to the email I see < b > Username</ b > not the actually [b]Username [/b]that's bold. How do I make it bold?
Link to comment
https://forums.phpfreaks.com/topic/17671-email-send-in-html/
Share on other sites

Thanks.

I tried that but it works in Yahoo mail, outlook, but not Gmail.

In Gmail I get:
[code]
MIME-Version: 1.0

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


[INFORMATION]<br />

<b>Tutor ID: </b> 37 <br />

<b>Username: </b> tester <br />

<b>Title: </b> Mr <br />

<b>First name: </b> Test <br />

<b>Last name: </b> Testing <br />
[/code]

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

$webmaster = "me@localhost";
@ $mp = mail($webmaster, $subject, $message, "From: $from \r\n" . $headers);
if(!$mp) die("Email error!");
Link to comment
https://forums.phpfreaks.com/topic/17671-email-send-in-html/#findComment-75473
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.