Jump to content

[SOLVED] PHP Mail help - Need an experts eye


Recommended Posts

For some reason, when I send emails from the server along with headers, the headers show up in the email like text... why is that? I've done this many times before.. Here's the code:

 

<?php
$confirm_email = "[email protected]";

// 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";
$headers .= 'From: '.$confirm_email . "\r\n";		

$to = "[email protected]";

$message = "
<html>
<head>
  <title>Submission</title>
</head>

<body>
Author: ".htmlspecialchars_decode($confirm_author)."<br />
Email: {$confirm_email}<br >
</body>
</html>
";

// Send the confirmation email
$mailit = mail($to, "New Article Submission: {$confirm_title}", $message, $headers);
?>

 

It shows up like this (this is all in the body of the email):

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

 

From: [email protected]

 

 

 

 

              <html>

 

                <head>

 

                <title>Submission</title>

 

                </head>

 

 

 

                <body>

 

                      Author: Author<br />

 

                      Email: [email protected]<br >

 

                </body>

 

              </html>

 

(the MY_EMAIL and THEIR_EMAIL is, of course, edit by me and not actually in the code).

 

Please help!

 

Wes

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.