Can't get my php forms to mail to emails not located on my server. What would be there reason for this? Some of the failed messages say that the user 'nobody" can't send emails. Is it dangerous to allow user 'nobody' to email? I figure it is. Here is my php code..
I gathered one email that said this...
I just want to be able to mail a form to [email protected] or [email protected] off the server. Can anyone give me some pointers?
Code:
//$contact is name of person filling out form
//$em is email address of person filling out form
$to = "\"$contact\"<$em>";
$headers = "From: \"MYDOMAIN.com\"<[email protected]>";
if (!$em==""){
mail( "[email protected]", "$subject", "$message", "$headers");
mail( "\"Rick\"<[email protected]>,\"Webmaster\"<[email protected]>", "$subject", "$info", "From: \"$contact\"<$em>");
Code:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es)
failed:
[email protected]
Mail sent by user nobody being discarded due to sender restrictions
in WHM->Tweak Settings
------ This is a copy of the message, including all the headers. ------
Return-path: <[email protected]>
Received: from nobody by server1.myserver.com with local (Exim
4.63)
(envelope-from <[email protected]>)
id 1IYW7f-0000Ml-BF; Thu, 20 Sep 2007 19:11:55 -0500
To: [email protected]
Subject: Wholesale Sign Builders Application
From:[email protected]
To:[email protected]
MIME-Version: 1.0
Content-Type: multipart/mixed;
Message-Id: <[email protected]>
Sender: Nobody <[email protected]>
Date: Thu, 20 Sep 2007 19:11:55 -0500