I am using the mail function to send a confirmation email to people who register an account on something i'm doing. However, when the email is sent, the headers show up as a part of the message.
Here is my code:
$Headers="
From: OKB Staff <okb@the-group.org>
Reply-To: OKB Staff <okb@the-group.org>
Content-Type: text/plain;
To: $Username <$EmailAddress>\n";
$Message="
Thanks for registering with us! In order to complete your registration, please click on the following link, or copy/paste it into your browser.
http://www.the-group.org/okb/register.php?action=ActivateAccount&UserID=$UserID&Authcode=".rawurlencode($Authcode)."
This email was sent by The-Group's Open Knowledge Base. If you did not register an account with us, please delete this- you will recieve no more mail from us.\n
Regards,
OKB staff.";
$Subject="OKB Registration confirmation.";
mail($EmailAddress, $Subject, $Message, $Headers);
[END]
The code produces the following email:
Received: from mx-out.daemonmail.net (mx-out.daemonmail.net [209.75.5.3])
by mx2.daemonmail.net (8.11.1/8.11.1) with ESMTP id f2GDWRU57345
for <arta@the-group.org>; Fri, 16 Mar 2001 05:32:27 -0800 (PST)
Received: from mx0.emailqueue.net (localhost.daemonmail.net [127.0.0.1])
by mx-out.daemonmail.net (8.9.3/8.9.3) with SMTP id FAA99075
for <arta@the-group.org>; Fri, 16 Mar 2001 05:32:27 -0800 (PST)
(envelope-from arta@the-group.org)
From: arta@the-group.org
Message-Id: <200103161332.FAA99075@mx-out.daemonmail.net>
Received: from slaptop (slaptop [202.21.10.35])
by mail.the-group.org with SMTP id vlP0RqV2
Fri, 16 Mar 2001 05:32:21 -0700 (PST)
Date: Fri, 16 Mar 2001 21:33:21 -0800
Subject: OKB Registration confirmation.
To: undisclosed-recipients:;
X-UIDL: 🙂$#!FcK"!M)"#!pVf!!
From: OKB Staff <okb@the-group.org>
Reply-To: OKB Staff <okb@the-group.org>
Content-Type: text/plain;
To: vebdbfef <arta@the-group.org>
Thanks for registering with us! In order to complete your registration, please click on the following link, or copy/paste it into your browser.
http://www.the-group.org/okb/register.php?action=ActivateAccount&UserID=53&Authcode=0.55336400%20984749597
This email was sent by The-Group's Open Knowledge Base. If you did not register an account with us, please delete this- you will recieve no more mail from us.
Regards,
OKB staff.
[END]
Any ideas anyone?