Advertisement
Guest User

Untitled

a guest
Mar 26th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <?php
  2.  
  3. header('Content-Type: text/html; charset=utf-8');
  4. require 'PHPMailerAutoload.php';
  5. $phpmailer = new PHPMailer;
  6. $phpmailer->isSMTP();
  7. $phpmailer->Host = 'mail.coffeewritingcontent.com';
  8. $phpmailer->SMTPAuth = true;
  9. $phpmailer->Username = 'iletisim@coffeewritingcontent.com';
  10. $phpmailer->Password = 'mypassword';
  11. $phpmailer->SMTPSecure = 'tls';
  12. $phpmailer->Port = '587';
  13. $phpmailer->From = 'iletisim@coffeewritingcontent.com';
  14. $phpmailer->FromName = $_POST['name'];
  15. $phpmailer->AddReplyTo($_POST['email'], $_POST['name']);
  16. $phpmailer->addAddress('iletisim@coffeewritingcontent.com', 'İletişim Formu');
  17. $phpmailer->isHTML(true);
  18. $phpmailer->Subject = 'İletisim formu mesajı';
  19. $phpmailer->Body = "isim: " . $_POST['name'] . "rnrnMesaj: " . stripslashes($_POST['message']);
  20. $phpmailer->CharSet = 'UTF-8';
  21. $phpmailer->SMTPDebug = 4;
  22. if(!$phpmailer->send()) {
  23. echo 'Mail gonderilemedi. Hata: ' . $phpmailer->ErrorInfo;
  24. exit;
  25. }
  26.  
  27. echo 'Mail gonderildi.';
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement