Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: text/html; charset=utf-8');
- require 'PHPMailerAutoload.php';
- $phpmailer = new PHPMailer;
- $phpmailer->isSMTP();
- $phpmailer->Host = 'mail.coffeewritingcontent.com';
- $phpmailer->SMTPAuth = true;
- $phpmailer->Username = 'iletisim@coffeewritingcontent.com';
- $phpmailer->Password = 'mypassword';
- $phpmailer->SMTPSecure = 'tls';
- $phpmailer->Port = '587';
- $phpmailer->From = 'iletisim@coffeewritingcontent.com';
- $phpmailer->FromName = $_POST['name'];
- $phpmailer->AddReplyTo($_POST['email'], $_POST['name']);
- $phpmailer->addAddress('iletisim@coffeewritingcontent.com', 'İletişim Formu');
- $phpmailer->isHTML(true);
- $phpmailer->Subject = 'İletisim formu mesajı';
- $phpmailer->Body = "isim: " . $_POST['name'] . "rnrnMesaj: " . stripslashes($_POST['message']);
- $phpmailer->CharSet = 'UTF-8';
- $phpmailer->SMTPDebug = 4;
- if(!$phpmailer->send()) {
- echo 'Mail gonderilemedi. Hata: ' . $phpmailer->ErrorInfo;
- exit;
- }
- echo 'Mail gonderildi.';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement