Page 1 of 1

php email script sends to 1 kind of emails but not to other

Posted: Sun Aug 12, 2012 2:28 am
by saar62097
hello all

I have a little php script on my server for sending mail:

Code: Select all

<?
$to=$_POST["to"];
$subject=$_POST["subject"];
$body=$_POST["body"];
mail($to,$subject,$body);
?>
when I pass this kind of email - myEmail@gmail.com all is fine but when I pass this kind of mail - mail@myWebSite.com the mail won't send. any ideas why?

also, i am not sure my server has mail turned on - does that matter?

thanx in advance

Re: php email script sends to 1 kind of emails but not to ot

Posted: Sun Aug 12, 2012 5:52 pm
by requinix
Your mail server probably doesn't allow you to send from an @myWebSite.com address. Ask whoever maintains it to let you do so.