Hi

I have seen your postings on PHP on this forum so I am writing to you.

I am facing some problems with sendmail function in PHP, below is the code I am using.

$fd = popen("/usr/sbin/sendmail -t","w") or die("Couldn't Open Sendmail");
fputs($fd, "To:".$tomail." \n");
fputs($fd, "From: \"ezfmx\" <support@mclab.kr> \n");
fputs($fd, "Reply-To: \"ezfmx\" <support@mclab.kr> \n");
fputs($fd, "Subject: Test message from my web site \n");
fputs($fd, "X-Mailer: PHP5 \n\n");
fputs($fd, "{$contents} \n");
pclose($fd);


I have tried changing the headers and used mail() function as well. and the problem is this code only sends email to GMAIL and only my office mail ID. except that no other mail id seems to work. Hotmail, yahoo, Naver.com and other domains seems not working at all.

I feel its not something to do with code. So, I doubt whether we need to register our mail server some where to tell that it is not spammer.

I am not able to find proper info on this since last two days.

can you please let me know what the problem is or if there is nayhting to do about it?

Thanks in advance for your time and help.