- Joined
- 5 Apr 2002
- Messages
- 13,314
We are in the process of migrating our web server from California to New York. During this transition we decided to go with Windows over Nix.
During testing I am receiving several errors with my mail scripts.
Here we go, showing one of each error:
Not sure about the first three errors. I tried adding single quotes, but that didn't seem to work well.
For the fourth set of errors: We are using $_GET['variable'] but does not seem to be passing through.
For the last: I have no clue, is it related to the fourth set of errors?
Thank you.
During testing I am receiving several errors with my mail scripts.
Here we go, showing one of each error:
PHP Notice: Use of undefined constant HTTP_CLIENT_IP - assumed 'HTTP_CLIENT_IP' in D:\walterelwoodmuseum.org\wwwroot\bin\contact.php on line 7
PHP Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in D:\walterelwoodmuseum.org\wwwroot\bin\contact.php on line 11
PHP Notice: Use of undefined constant HTTP_USER_AGENT - assumed 'HTTP_USER_AGENT' in D:\walterelwoodmuseum.org\wwwroot\bin\contact.php on line 15
PHP Notice: Undefined index: contactContactName in D:\walterelwoodmuseum.org\wwwroot\bin\contact.php on line 17
Warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address in D:\walterelwoodmuseum.org\wwwroot\bin\contact.php on line 79
Not sure about the first three errors. I tried adding single quotes, but that didn't seem to work well.
if (getenv(HTTP_CLIENT_IP)) {
$ip = getenv(HTTP_CLIENT_IP);
}
else {
$ip = getenv(REMOTE_ADDR);
}
$hostname = gethostbyaddr($ip);
$client = getenv(HTTP_USER_AGENT);
For the fourth set of errors: We are using $_GET['variable'] but does not seem to be passing through.
$name = $_POST['contactContactName'];
For the last: I have no clue, is it related to the fourth set of errors?
$mailto = "matt@email.com";
$mailcc = "director@email.com";
$subject = "[walterelwoodmuseum.org] Incoming E-mail from ".$name;
$from = "From: $name <$email>\nCc: $mailcc\nReply-To: $email\nMIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n";
Thank you.