Problem with mail()
Posted: Thu Aug 12, 2010 6:18 am
For some reason the mail function has stopped working on a client's server...I'm not familiar enough with how it functions that I can narrow down the issue. It returns TRUE, but I am not receiving the e-mail in my test code. What steps should I take to narrow down the problem? I've read somewhere that it's a problem either with the php.ini setting for sendmail or sendmail itself, but I have no idea how to fix that, or even if that is indeed the problem.
My code is this:
I see "mailed successfully" when I load the page, but it's not sending to my e-mail. I've checked multiple times to make sure I'm typing it correctly, so I doubt it's any stupid mistake like that. Any help would be appreciated.
My code is this:
Code: Select all
$mailed = mail('my-email@my-host.com', 'test', 'test body');
echo ($mailed) ? 'Mailed successfully' : 'Failure';