hablood
Öğrenci
- Katılım
- 21 Şubat 2019
- Mesajlar
- 2
- Reaksiyon puanı
- 0
- Puanları
- 1
- Yaş
- 36
kolay gelsin arkadaşlar bir sorunum olacak phpmailler de iletişim formu yaptım herşey tamam formu gönder dediğimde mail gidiyor fakat iletişim sayfasında uyarı vermiyor yani mesaj gönderildi yada mesaj gönderilmedi uyarısını hangi komutla verebilirim yazdırabilirim dosyaları ekliyorum kontrol edip yardımcı olaiblirmisniz lütfen
PHP:
<?php
ob_start();
session_start();
$smtpuser="info@zeynabilisim.com";
$smtphost="mail.zeynabilisim.com";
$smtpport="25";
$smtppass="[B]**[/B]";
if (isset($_POST['iletisimform'])) {
$adsoyad = htmlspecialchars(trim($_POST['adsoyad']));
$telefon = htmlspecialchars(trim($_POST['telefon']));
$konu = htmlspecialchars(trim($_POST['konu']));
$eposta = htmlspecialchars(trim($_POST['eposta']));
$mesaj = htmlspecialchars(trim($_POST['mesaj']));
$ip = htmlspecialchars(trim($_POST['ip']));
include 'class.phpmailer.php';
$epostal=$smtpuser;
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = false;
$mail->Host = $smtphost;
$mail->Port = $smtpport;
$mail->SMTPSecure = 'tls';
$mail->Username = $smtpuser;
$mail->Password = $smtppass;
$mail->SetFrom($mail->Username, $adsoyad);
$mail->AddAddress($epostal, $adsoyad);
$mail->AddAddress($eposta, $adsoyad);
$mail->CharSet = 'UTF-8';
$mail->Subject = 'İletişim Formu';
$content = '
<b>Websitenizden gelen İletişim maili</b><br>
<table>
<tr>
<td class="tg-031e">Ad Soyad</td>
<td class="tg-031e">:</td>
<td class="tg-031e">'.$adsoyad.'</td>
</tr>
<tr>
<td class="tg-031e">Telefon</td>
<td class="tg-031e">:</td>
<td class="tg-031e">'.$telefon.'</td>
</tr>
<tr>
<td class="tg-031e">E-posta</td>
<td class="tg-031e">:</td>
<td class="tg-031e">'.$eposta.'</td>
</tr>
<tr>
<td class="tg-031e">Konu</td>
<td class="tg-031e">:</td>
<td class="tg-031e">'.$konu.'</td>
</tr>
<tr>
<td class="tg-031e">Mesaj</td>
<td class="tg-031e">:</td>
<td class="tg-031e">'.$mesaj.'</td>
</tr>
<tr>
<td class="tg-031e">İp Adresi</td>
<td class="tg-031e">:</td>
<td class="tg-031e">'.$ip.'</td>
</tr>
</table>';
$mail->MsgHTML($content);
if($mail->Send()) {
header("Location:../iletisim.php?iletisimgonder=ok");
} else {
header("Location:../iletisim.php?iletisimgonder=no");
}
}
exit;
?>
BUDA İLETİŞİM SAYFASI
<div class="contactForm row m0">
<div class="contactForm">
<div class="row">
<div class="successMessage alert alert-success alert-dismissible fade in margin-top-30" role="alert" style="display: none">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><i class="fa fa-times"></i></button>
BU ALANA NASIL YAZDIRABİLİRİM BURADA MESAJ GÖNDERİLDİ İLETİSİNİ İLETİŞİM SAYFASINA YAZIRACAK
</div>
</div>
<br>
<form id="iletisim" role="form" action="phpmail/index.php" method="post" class="contact_form contactForm validateIt" data-email-subject="Contact Form" data-show-errors="true">
<div class="row">
<div class="form-group">
<input required type="text" name="adsoyad" class="name form-control" placeholder="Ad Soyad">
</div>
<div class="form-group">
<input required type="email" name="eposta" class="email form-control" placeholder="E-mail">
</div>
<div class="form-group">
<input required type="tel" name="telefon" class="phonenumber form-control" placeholder="Telefon Numarası">
</div>
<div class="form-group">
<textarea class="form-control" rows="4" name="mesaj" required placeholder="Mesajınızı Yazınız"></textarea>
</div>
<button type="submit" name="iletisimform" class="submit btn btn-block btn-primary">Formu Gönder</button>
</div>
</form>
</div>
</div>