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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.