Merhabalar;
PHP mailer ile bir form mail uygulaması yaptım ancak mesaj gönderildikten
sonra hata raporu gibi bir takım yazılar bastırıyor safaya...
SMTP -> FROM SERVER: 220 mail.atakweb.com ESMTP Merak 8.3.8; Fri, 16 May
2008 15:41:28 +0300 SMTP -> FROM SERVER: 250-mail.atakweb.com Hello pc [
85.109.76.40], pleased to meet you. 250-ENHANCEDSTATUSCODES 250-SIZE
250-EXPN 250-ETRN 250-ATRN 250-DSN 250-CHECKPOINT 250-8BITMIME 250-AUTH
CRAM-MD5 DIGEST-MD5 LOGIN PLAIN 250-AUTH=LOGIN 250-STARTTLS 250 HELP SMTP ->
FROM SERVER: 250 2.1.0 ... Sender ok SMTP -> FROM SERVER: 250 2.1.5 ...
Recipient ok SMTP -> FROM SERVER: 354 Enter mail, end with "." on a line by
itself SMTP -> FROM SERVER: 250 2.6.0 818 bytes received in 00:00:01;
Message id WRF92229 accepted for delivery SMTP -> FROM SERVER: 221 2.0.0
mail.atakweb.com closing connection
Mesajınız iletilmiştir.
bu mesajı vermemesi için ne yapmam gerekli bir fikri olan varmı?
aşağıda sayfanın kodlarınıda veriyorum...
<?php
session_start();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Form Mail</title>
<link href="css/validate.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/validate.js"></script>
</head>
<body>
<?php
if (empty($_POST)) {
//--- tarih fonksiyonu ---//
function tarih($zaman) {
$gunler = array( "Pazar", "Pazartesi", "Salı",
"Çarsamba", "Perşembe", "Cuma", "Cumartesi");
$aylar =array( NULL, "Ocak", "Şubat", "Mart", "Nisan",
"Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim",
"Kasım", "Aralık");
$tarih = date("d",$zaman)." ".$aylar[date("n",$zaman)]."
".date("Y",$zaman)." ".$gunler[date("w",$zaman)]." ".date("H:i",$zaman);
return $tarih;
}
$zaman = time();
$tarih = tarih($zaman);
//--- tarih fonksiyonu sonu ---//
?>
<form id='myform' method='POST'>
<input type="hidden" name="ip_no" value="<?php echo
getenv("REMOTE_ADDR");?>" />
<input type="hidden" name="tarih" value="<?php echo "$tarih";?>" />
<p><label>İsim:</label><input type="text" name="isim"
title="Lütfen adınızı yazınız."
class="required" /></p>
<p><label>E-Mail:</label><input type="text" name="e_mail" title="Lütfen
geçerli bir mail adresi yazınız." class="required email"
/></p>
<p><label>Telefon:</label><input type="text" name="telefon"
title="Lütfen geçerli bir telefon numarası
yazınız." class="required number" /></p>
<p><label>Konu:</label><input type="text" name="konu" title="Lütfen
adınızı yazınız." class="required" /></p>
<p><label>Mesaj:</label><textarea name="mesaj" title="Lütfen bize
iletmek istediğiniz mesajınızı yazınız."
class="required" cols="35" rows="5"></textarea></p>
<p><label> </label><img src="securimage_show.php?sid=<?php echo
md5(uniqid(time())); ?>" id="image">
<a href="#" onclick="document.getElementById('image').src =
'securimage_show.php?sid=' + Math.random(); return false">Resmi
Yenile</a></p>
<p><label>Güvenlik Kodu:</label><input type="text" name="code"
title="Lütfen üst tarafta gördüğünüz
rakam ve harfleri yazınız." class="required" /></p>
<p><label> </label><input type="submit" name="button" id="button"
value="Submit" class="submit" /></p>
</form>
<script type="text/javascript">
window.addEvent('domready', function(){
var myFormValidation = new Validate('myform',{
errorClass: 'red'
});
});
</script>
<?php
} else { //form is posted
include("securimage.php");
$img = new Securimage();
$valid = $img->check($_POST['code']);
$ip_no = $_POST['ip_no'];
$tarih = $_POST['tarih'];
$isim = $_POST['isim'];
$e_mail = $_POST['e_mail'];
$telefon = $_POST['telefon'];
$konu = $_POST['konu'];
$mesaj = $_POST['mesaj'];
$mail_body="
<p><label><b>İsim :</b></label>".$isim."</p>".
"<p><label><b>E-Mail :</b></label>".$e_mail."</p>".
"<p><label><b>Telefon :</b></label>".$telefon."</p>".
"<p><label><b>Konu :</b></label>".$konu."</p>".
"<p><label><b>Mesaj :</b></label>".$mesaj."</p>".
"<p>Bu mesaj <b>".$tarih."</b> tarihinde <b>".$ip_no."</b> IP numaralı
kullanıcıdan gönderilmiştir.</p>";
if($valid == true) {
require 'class.phpmailer.php';
require 'class.pop3.php';
$pop = new POP3();
$pop->Authorise('mail.eksenmedyagrup.com', 110, 25, 'xxxxxx_at_xxxxxxxxx.com',
'xxxxxxxxxxxx', 1);
$mail = new PHPMailer();
$mail->CharSet = 'ISO-8859-9';
$mail->IsSMTP();
$mail->SMTPDebug = 2;
$mail->IsHTML(true);
$mail->Host = 'mail.xxxxxxxxxxxxxxx.com';
$mail->From = 'xxxxx_at_xxxxxxxxxx.com';
$mail->FromName = 'Erdem Uyguner';
$mail->Subject = 'Form Bilgileri';
$mail->Body = iconv("UTF-8","ISO-8859-9",$mail_body);
$mail->AddAddress('xxxxx_at_xxxxxxxxxxxxxxx.com', 'Erdem');
if (!$mail->Send()){
# echo $mail->ErrorInfo;
}
else{
#echo "OK";
}
echo "Mesajınız iletilmiştir.";
} else {
echo "<center>Sorry, the code you entered was invalid. <a
href=\"javascript:history.go(-1)\">Go back</a> to try again.</center>";
}
}
?>
</body>
</html>
-- http://dokumantasyon.org/blog/
_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Received on Fri 16 May 2008 - 16:45:33 EEST