krislaib
12-28-2006, 03:00 PM
I've searched this forum, as well as google, and tried many of the examples, but I can't for the life of me get mail() to work.
Here's the current code I'm trying, please let me know what I'm missing:
<?php
echo "Prepare to send...";
$to = "myaddy@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "admin@myBHdomain.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
When I hit the page, I get the "prepare to send..." text after what seems like a 1 minute timeout. The mail message is never sent, and I don't receive the "Mail Sent" echo to the screen.
Thanks in advance for any help!
-Kris
Here's the current code I'm trying, please let me know what I'm missing:
<?php
echo "Prepare to send...";
$to = "myaddy@gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "admin@myBHdomain.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
When I hit the page, I get the "prepare to send..." text after what seems like a 1 minute timeout. The mail message is never sent, and I don't receive the "Mail Sent" echo to the screen.
Thanks in advance for any help!
-Kris