• 02-02-2019, 21:42:14
    #1
    Üyeliği durduruldu
    Merhaba,

    Bir çok sitede iletişim formu kullanıyorum bir diğerinden alıp farklı bir siteye iletişim formu yapmak istedim ama gönderilmiyor dosyalarıda tamam aşağıda kodlaması mevcut.

    <?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>';
    
    }
    
    }
    
     ?>
    <div class="contact-message-feedback-form">
    				<form action="#" method="post">
    					<div class="name">
    						<input type="text" name="name" placeholder="Adınız & Soyadınız">
    					</div>
    					<div class="subject">
    						<input type="text" name="subject" placeholder="Konu">
    					</div>
    					<div class="mail">
    						<input type="email" name="email" placeholder="E-Mail Adresiniz">
    					</div>
    						<div class="mail">
    						<input type="phone" name="phone" placeholder="Telefonunuz">
    					</div>
    					<div class="message">
    						<textarea name="comments" placeholder="Mesajınız"></textarea>
    					</div>
    					<div class="subm">
    						<input type="submit" value="Gönder">
    					</div>
    				</form>
    			</div>
  • 02-02-2019, 21:51:21
    #2
    <?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.
  • 02-02-2019, 21:58:42
    #3
    Üyeliği durduruldu
    avsarsoft adlı üyeden alıntı: mesajı görüntüle
    <?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