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 = "THEIR_EMAIL@gmail.com";

// 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 = "MY_EMAIL@gmail.com";

$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: THEIR_EMAIL@gmail.com

 

 

 

 

              <html>

 

                <head>

 

                <title>Submission</title>

 

                </head>

 

 

 

                <body>

 

                      Author: Author<br />

 

                      Email: MY_EMAIL@gmail.com<br >

 

                </body>

 

              </html>

 

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

 

Please help!

 

Wes

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.