Menu
Hello people
I am using the following code to try to send an email:
[code=php]
$to = “[email protected]”;
$subject = “This is a test”;
$message = “This is the message body”;
$header = “From: John Smith <[email protected]>”;
mail($to, $subject, $message, $header);
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