Jump to content

html mail not html in gmail


project3

Recommended Posts

i have some code that wont send html mail. i got it from the online mail manual but yet when getting it in gmail it doesn't come as html mail.

 

 

<?php
// multiple recipients

$to = '[email protected]';

// subject
$subject = 'html test';

// message
$message = '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>

</body>
</html>
';

// 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";



// Mail it
mail($to, $subject, $message, $headers);
?> 

Link to comment
https://forums.phpfreaks.com/topic/105219-html-mail-not-html-in-gmail/
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.