Why does PHP's mail() return false?

Hey, I've got this very simple script in which I use mail() . I've tried two different hosts to send simply mail('[email protected]', 'hoi', 'hoi') but they both return false without any further error message.

Could it be that coincidentally both hosts have blocked using mail() on way or another?

Comments

  • The quickest way to things these types of issues is to drop a line to your hosting company, point out where your script is, and telling them that the function mail doesn't work - they will fix this for you.

  • Or it might not be configured properly. Check the config file, and look in the help under "mail functions" to see what needs to be set. There are four or so parameters that need fixin'.

  • It's definitely a problem on the server(s). Maybe verify that your changes took effect.

    <?

    phpinfo(4);

    ?>

Sign In or Register to comment.