PHP SMTP Mail Gönderme

PHP SMTP Mail Gönderme
<?php
  require_once "mail/PHPMailerAutoload.php";

  $mail = new PHPMailer();
  $mail->IsSMTP();
  $mail->SMTPDebug = 1; 
  $mail->SMTPAuth = true;
  $mail->SMTPSecure = 'tls';
  $mail->Host = 'smtp.yandex.com';
  $mail->Port = 587;
  $mail->IsHTML(true);
  $mail->SetLanguage("tr", "phpmailer/language");
  $mail->CharSet ="utf-8";
  $mail->Username = "[email protected]"; 
  $mail->Password = "mailsifresiniz";
  $mail->SetFrom("[email protected]", "İSİM SOYİSİM"); // Mail attigimizda yazacak isim
  $mail->AddAddress("[email protected]"); // Maili gonderecegimiz kisi/ alici
  $mail->Subject = "Konu Başlığı"; // Konu basligi
  $mail->Body = "Mail İçeriği"; // Mailin icerigi
  $mail->Send();


?>

Dosyalar