0
我正在測試這個(漂亮)simple form從CSS技巧。在Godaddy託管的網站上。在Godaddy託管PHP表單的SMTP問題!
而且我得到以下警告:
Warning: mail() [function.mail]: SMTP server response: 451 See
http://pobox.com/~djb/docs/smtplf.html在 d :\上線32
託管\ 4923367 \ HTML \測試\ contactengine (我查但我沒有看到任何有用的東西)
contactengine.php
<?php
$EmailFrom = "[email protected]";
$EmailTo = "[email protected]";
$Subject = "Nice & Simple Contact Form by CSS-Tricks";
$Name = Trim(stripslashes($_POST['Name']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Email = Trim(stripslashes($_POST['Email']));
$Message = Trim(stripslashes($_POST['Message']));
// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.php\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>
有什麼建議嗎?
難道我的回答解決您的問題來表示? – 2010-07-25 08:32:59