call to mail() doesn't work in Windows
Posted: Mon Dec 19, 2005 2:06 pm
Hello people
I am using the following code to try to send an email:
This code works fine when I run it on a Linux machine.
It does not work when I try it on a Windows machine
I have SMTP server installed
Is there something wrong in the mail format? including the body and the headers for Windows?
any help would be appreciated
I am using the following code to try to send an email:
Code: Select all
$to = "test@test.com";
$subject = "This is a test";
$message = "This is the message body";
$header = "From: John Smith <johnsmith@test.com>";
mail($to, $subject, $message, $header);It does not work when I try it on a Windows machine
I have SMTP server installed
Is there something wrong in the mail format? including the body and the headers for Windows?
any help would be appreciated