Jump to content

mail() function... simple but no luck


magnetica

Recommended Posts

Ok very simple mail function here. I tested it on my server (not local, remote) and I get the message echo'ed out:

 

The email has been sent.

 

 

 

So it seems to work but I check my messages and nothing has come through. By the way I have posted this around 20 minutes after I tried it so it has had plenty of time to come through.

 

Heres the code (anyone tell what i'm doing wrong?)

<?php

//Email to be sent to
$to= "[email protected]";

// Your email address
$from= "[email protected]";

// The subject
$subject = "Enter your subject here";

// The message
$message = "Enter your message here";

mail($to, $subject, $message, "From: $from");

echo "The email has been sent.";

?>

Link to comment
https://forums.phpfreaks.com/topic/40752-mail-function-simple-but-no-luck/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.