PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$headers = array("From: some name <some email address>");
$result = mail('known email address', 'Test Email', 'This is a test email.', $headers);
echo "result=$result<br>";
If email() works then maybe add some debug to you script:
Sorry for the ignorance - I am very new to PHP. This said, I was informed that this code was almost a 'plug and play' piece but it is still not working. I have spoken with my domain host and they have confirmed there are no server issues so it must be an issue with the code.
I think I ought to commision someone to build a working code for me because this is dumbfounding me.
Have you tried creating a php file from the first piece of code I posted above, adding real email addresses, and running it? That would let you know if email is working at all -- which may be the problem, not your code.
Or can you add the lines from the second piece of code I posted above to your script? That would give you some debug information.