kadiiruzun
80+
- Katılım
- 17 Mayıs 2020
- Mesajlar
- 81
- Reaksiyon skoru
- 27
Kullandığım hosting servisinden örnek SMTP form aldım. Kodları düzenledim fakat mail gönderildi demesine rağmen posta kutuma mail düşmüyor. Kodlar aşağıdadır.
FORM KISMI:
<html>
<head>
<meta http-equiv="Content-Language" content="tr">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<title>New Page 1</title>
</head>
<body>
<form method="POST" action="mail.php" method="post">
<p><font color="#FF0000"><b>Adýnýz Soyadýnýz:
<input type="text" name="isim" size="20"></b></font></p>
<p><font color="#FF0000"><b>E-mail Adresiniz:
<input type="text" name="mailad" size="20"></b></font></p>
<blockquote>
<p><font color="#FF0000"><b>Konu :
</b></font> <input type="text" name="baslik" size="20"></p>
</blockquote>
<p><b><font color="#FF0000">Mesajýnýz :
<textarea rows="6" name="mesaj" cols="30"></textarea></font></b></p>
<p><input type="submit" value="Gönder"></p>
</form>
</body>
</html>
PHP GÖNDERİM KISMI:
<?
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "mail.esenlerlimit.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "mail.esenlerlimit.com"; // SMTP username
$mail->Password = "*******"; // SMTP password
$mail->Port = 587;
$mail->From = "mail.esenlerlimit.com"; // smtp kullanıcı adınız ile aynı olmalı
$mail->Fromname = "giden ismi";
$mail->AddAddress("[email protected]","Ornek Isim");
$mail->Subject = $_POST['baslik'];
$mail->Body = implode(" ",$_POST);
if(!$mail->Send())
{
echo "Mesaj Gönderilemedi <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Mesaj Gönderildi";
?>
FORM KISMI:
<html>
<head>
<meta http-equiv="Content-Language" content="tr">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<title>New Page 1</title>
</head>
<body>
<form method="POST" action="mail.php" method="post">
<p><font color="#FF0000"><b>Adýnýz Soyadýnýz:
<input type="text" name="isim" size="20"></b></font></p>
<p><font color="#FF0000"><b>E-mail Adresiniz:
<input type="text" name="mailad" size="20"></b></font></p>
<blockquote>
<p><font color="#FF0000"><b>Konu :
</b></font> <input type="text" name="baslik" size="20"></p>
</blockquote>
<p><b><font color="#FF0000">Mesajýnýz :
<textarea rows="6" name="mesaj" cols="30"></textarea></font></b></p>
<p><input type="submit" value="Gönder"></p>
</form>
</body>
</html>
PHP GÖNDERİM KISMI:
<?
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "mail.esenlerlimit.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "mail.esenlerlimit.com"; // SMTP username
$mail->Password = "*******"; // SMTP password
$mail->Port = 587;
$mail->From = "mail.esenlerlimit.com"; // smtp kullanıcı adınız ile aynı olmalı
$mail->Fromname = "giden ismi";
$mail->AddAddress("[email protected]","Ornek Isim");
$mail->Subject = $_POST['baslik'];
$mail->Body = implode(" ",$_POST);
if(!$mail->Send())
{
echo "Mesaj Gönderilemedi <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Mesaj Gönderildi";
?>