59d3f1d2ab68cc01d5fe

(Turkish) OnePlus 5 Oreo güncellemesi ile Face Lock kilidini getiriyor

(Turkish) PHP Toplu Mail Gönderme

(Turkish) Apple iPhone X şu anda 14 yeni ülkede satışa sunuluyor

Send mail with Yandex SMTP

PHP Programming Monday May 29th, 2017
1,463 Görüntülenme

A nice code you can use if you want to send mail with PHP using Yandex SMTP service.

  • First download the necessary libraries from here.
  • Include the mail folder in the RAR archive that you downloaded in the pro- cess.
<?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 Address"; 
  $mail->Password = "Password";
  $mail->SetFrom("Sender Mail Address", "Sender Name"); 
  $mail->AddAddress("Buyer Mail Address");
  $mail->Subject = "Topic title";
  $mail->Body = "Mail Content";
  $mail->Send();


?>

 

Yorumlar

Henüz hiç yorum yapılmamış.

Benzer İçerikler