Sendmail PHP


Im trying to use sendmail via PHP but although this is returning true from the PHP function, no emails are being received on this hosting account. The function has been tried on other servers and works okay.

the hosting plan is ‘My Happy Hosting’. the PHP example is:

$recipient = “Name”;
$subject = “Hey, a new order!”;
$message = “Check it out, a new order!”;
$extra = “From:\r\nReply-To:”;
mail($recipient, $subject ,$message,$extra);

does senmail need to be enabled for this hosting account type?



I tried the same on my account and it works good. The only reason could be wrong recipient adress, but also then you should have false returned by mail() function.

thanks Kashub,

In fact the mail function worked fine as the return values showed, it was just a delay/lag on the outgoing mail so we didnt get it for a couple of hours! very frustrating but at least it works.