Okay, I have asked so much today and feel bad, but this problem is getting hard to work out.
I am trying to use the Mail() PHP function to send an Email from my server to the user so they can activate their account. Here is what I have so far.
I am able to send an email with this code no problem.
if (!mail(cafrow@hotmail.com,"Account activation for 2CGs", $emailmessage,
"From: cafrow@$SERVER_NAME\r\n"
."Reply-To: cafrow@$SERVER_NAME\r\n"
."X-Mailer: PHP/" . phpversion() )){
echo "Email not Send.";
exit();
}
but when I use a Variable instead of the straight up email it does not work. so if I use
$email=$_REQUEST['email'];
if (!mail($email,"Account activation for 2CGs", $emailmessage,
"From: cafrow@$SERVER_NAME\r\n"
."Reply-To: cafrow@$SERVER_NAME\r\n"
."X-Mailer: PHP/" . phpversion() )){
echo "Email not Send.";
exit();
}
when I do this I get a WEIRD ass error, does not make sence but I get an email to my hotmail account that says this
A message that you sent contained no recipient addresses, and therefore no
delivery could be attempted.
------ This is a copy of your message, including all the headers. ------
Received: from nobody by box9.fuitadnet.com with local (Exim 4.24)
id 1AbCKo-0006Ln-OB; Tue, 30 Dec 2003 00:22:26 -0500
To:
Subject: Account activation for 2computergeeks
From: [email]cafrow@2computergeeks.com[/email]
Reply-To: [email]cafrow@2computergeeks.com[/email]
X-Mailer: PHP/4.3.4
Message-Id: <E1AbCKo-0006Ln-OB@box9.fuitadnet.com>
X-rewrote-sender: [email]nobody@box9.fuitadnet.com[/email]
Date: Tue, 30 Dec 2003 00:22:26 -0500
this is a test to see if the mail server works
It makes no sence. I have mail forwarding to my hotmail from my domain but it has never worked till now, I have no clue that is going on here.
EDIT: I just tested and I am receiving this email Because of the email forwarding, It does have something to do with not being able to read the email address from a variable. I have tried putting ' ' around it and that did not work. I am so lost.
any help would be apriciated.