Programming, for all ages and all languages.
B.E
Member
Posts: 275 Joined: Sat Oct 21, 2006 5:29 pm
Location: Brisbane Australia
Contact:
Post
by B.E » Wed Aug 29, 2007 8:31 pm
Why isn't this working. It's Successfuly but don't receive anything
Code: Select all
function SendNotificationEmail($ToEmail){
global $AdminEmail;
global $TestSMSEmail;
$message = file_get_contents("Email.message");
$Boundary = "----=_NextPart_001_0038_01C7EAEB.9059B200";
$headers = "From: $AdminEmail \n";
$headers .= "MIME-Version: 1.0\n" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"$Boundary\"";
if (mail($ToEmail, "This is a testmessage", $message, $headers))
echo "Hey";
else
echo "Nay";
}
Microsoft: "let everyone run after us. We'll just INNOV~1"
AndrewAPrice
Member
Posts: 2299 Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)
Post
by AndrewAPrice » Thu Aug 30, 2007 2:15 am
Is your PHP configuration set up to connect to your mail server? (You usually do this from the PHP config file (php.ini on Windows) - not from within the PHP script.)