I am trying to send an HTML mail through PHP, but I can't seem to get it working.
This is my code:
// multiple recipients
$to = 'mail';
// subject
$subject = 'Subject';
// message
$message = "
<html>
<head>
<title>Thanks</title>
</head>
<body>
<div>
<b>Thanks for your email</b>
</div>
</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";
// Additional headers
$headers .= 'To: info <info@example.com>' . "\r\n";
$headers .= 'From: Pynix <info@example.com>' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
This also doesn't show any sender when I receive it in Outlook.
Anyone an idea?
Thanks