
03-02-2012, 17:04:18
|
| |
PHP- Kodu: <?php
// Pull contact details
$sendTo = "yasakbu@msn.com";
$subject = "Yeni mesajın var";
// Do not edit the following lines
$name = trim($_POST["str_name"]);
$email = trim($_POST["str_email"]);
$message = "isim: ".$name." \n tel: ".trim($_POST["str_phone"])." \n e-posta: ".$email." \n ilet: ".trim($_POST["str_comment"]);
$headers = "From: " . $name . " <" . $email . ">\r\n";
if (mail($sendTo, $subject, $message, $headers)) {
echo "result=sent";
} else {
echo "result=failed";
}
?> mailform2.php içindeki kodları bu yazdığım kodlar ile değiştirin çalışacaktır.
hatanın nedeni yanlış post value yüzünden header içindeki email adresi ve isim boş gidiyor.
hotmail de isimsiz ve gönderen adresi olmayan maile hata veriyor.
Konu digiklan tarafından (04-02-2012 Saat 00:26:36 ) değiştirilmiştir..
|