<?php
if ($_POST) {
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$phone = strip_tags($_POST['phone']);
$comments = strip_tags($_POST['comments']);
$subject = strip_tags($_POST['subject']);
include 'class.phpmailer.php';
include 'class.smtp.php';
include 'PHPMailerAutoload.php';
$comment_notifi_text = "Merhaba, 1 yeni mailiniz var.<br>
<strong>Ad:</strong> $name <br>
<strong>Mail:</strong> $email <br>
<strong>Telefon:</strong> $phone <br>
<strong>Konu:</strong> $subject <br>
<strong>Mesaj:</strong> $comments <br><br>
<hr>
<strong>Bu mail site üzeri iletişim formundan gönderilmiştir.</strong>
";
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'mail.sunucusu.com';
$mail->Port = 587;
$mail->Username = 'infositemailadresi';
$mail->Password = 'sifregirilecek';
$mail->SetFrom($mail->Username, "Mail");
$mail->AddAddress($mail->Username, $name);
$mail->CharSet = 'UTF-8';
$mail->Subject = '1 Yeni Mail Geldi';
$mail->MsgHTML($comment_notifi_text);
if($mail->Send()) {
echo '<script>alert("Mail Gönderildi")</script>';
}
}
?>bu kısmı örneğin mesaj.php olarak kaydet ve form action kısmına mesaj.php yi ekle muhtemelen gönderim sağlanacaktır.
hocam dediğiniz gibi yaptım ama beyaz bir sayfa çıkıyor göndere basınca