Sendmail PHP

software development

#1

Hi,

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 someone@somedomain.com”;
$subject = “Hey, a new order!”;
$message = “Check it out, a new order!”;
$extra = “From: Webmastersomeone@alternativedomain.com\r\nReply-To: someone@alternativedomain.com”;
mail($recipient, $subject ,$message,$extra);

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

thanks

max


#2

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.


#3

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.

thanks