NeilKelty
07-13-2005, 11:07 PM
When the form on the page contact.php requests processing from processform.php and error is generated stating the following:
Warning: mail(): SMTP server response: 550 Requested action not taken: mailbox unavailable or not local in C:\Domains\terryhaffner.com\wwwroot\processform.php on line 88
The links that may be needed are:
http://www.terryhaffner.com/contact.php
http://www.terryhaffner.com/processform.php?code=2
The PHP Code in processform.php is as follows:
<?php
$code = 0;
$code = $_GET['code'];
if($code == 1){
$name = $_POST['fullname'];
$recipient = 'buy@terryhaffner.com';
$subject = "Buy A Painting";
$from = stripslashes($_POST['email']);
$msg = "$fullname has sent a comment to you!\n\n".stripslashes($_POST['message']);
mail($recipient, $subject ,$msg, "From: $email\n");
echo '<p>We appreciate your comments</p>';
}
else if($code == 2){
$toValue = 0;
$toValue = $_POST['recipient'];
$name = $_POST['fullname'];
$from = stripslashes($_POST['email']);
$msg = "$fullname has sent a comment to you!\n\n".stripslashes($_POST['message']);
$subject = "Website";
$subject = $_POST['subject'];
if($toValue == 1){
$to = "terry@terryhaffner.com";
}
else if($toValue == 2){
$to = "support@terryhaffner.com";
}
else if($toValue == 4){
$to = "buy@terryhaffner.com";
}
else if($toValue == 5){
$to = "appear@terryhaffner.com";
}
else{
$to = "wbmstr@terryhaffner.com";
}
mail($recipient, $subject ,$msg, "From: $email\n");
echo '<p>We appreciate your comments</p>';
}
else{
echo 'Please use a valid form';
}
?>
Warning: mail(): SMTP server response: 550 Requested action not taken: mailbox unavailable or not local in C:\Domains\terryhaffner.com\wwwroot\processform.php on line 88
The links that may be needed are:
http://www.terryhaffner.com/contact.php
http://www.terryhaffner.com/processform.php?code=2
The PHP Code in processform.php is as follows:
<?php
$code = 0;
$code = $_GET['code'];
if($code == 1){
$name = $_POST['fullname'];
$recipient = 'buy@terryhaffner.com';
$subject = "Buy A Painting";
$from = stripslashes($_POST['email']);
$msg = "$fullname has sent a comment to you!\n\n".stripslashes($_POST['message']);
mail($recipient, $subject ,$msg, "From: $email\n");
echo '<p>We appreciate your comments</p>';
}
else if($code == 2){
$toValue = 0;
$toValue = $_POST['recipient'];
$name = $_POST['fullname'];
$from = stripslashes($_POST['email']);
$msg = "$fullname has sent a comment to you!\n\n".stripslashes($_POST['message']);
$subject = "Website";
$subject = $_POST['subject'];
if($toValue == 1){
$to = "terry@terryhaffner.com";
}
else if($toValue == 2){
$to = "support@terryhaffner.com";
}
else if($toValue == 4){
$to = "buy@terryhaffner.com";
}
else if($toValue == 5){
$to = "appear@terryhaffner.com";
}
else{
$to = "wbmstr@terryhaffner.com";
}
mail($recipient, $subject ,$msg, "From: $email\n");
echo '<p>We appreciate your comments</p>';
}
else{
echo 'Please use a valid form';
}
?>