Spurious character in email sent with mail()
Posted: Fri Feb 11, 2011 3:53 pm
I have the following code which sends an email to the maintainer (who happens to be me
):
The message body which is delivered is as follows:
Where is the spurious '>' coming from?
(Using PHP 5.2.5 on Windows 7. Browser is Firefox.)
Code: Select all
// Compose and send the email
$headers = "From: $mail_from_address"."\r\n";
$headers .= "Reply-To: $mail_from_address"."\r\n";
$headers .= "X-Mailer: PHP/".phpversion();
$message = "To: Maintainer\nFrom user: $username\n\n";
$message .= $text;
ini_set("track_errors", "1");
ini_set("SMTP", $mail_smtp_host);
$sent = mail($maint_email, $email_prefix." - ".$subject, $message, $headers);
Code: Select all
To: Maintainer
>From user: jeff
This is a test.
(Using PHP 5.2.5 on Windows 7. Browser is Firefox.)