serhatyucell

Wordpress SMTP Ayarı

Mar 10th, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1. // temamızın functions.php dosyasına bitiş kodu ?> 'dan önce bu kodları ekliyoruz ve SMTP bilgilerimizi giriyoruz.
  2.  
  3. add_action('phpmailer_init','send_smtp_email');
  4. function send_smtp_email( $phpmailer )
  5. {
  6.     // SMTP ile mail yollatıyoruz
  7.     $phpmailer->isSMTP();
  8.  
  9.     // SMTP Sunucu adresiniz
  10.     $phpmailer->Host = "mail.smtpsunucu.com";
  11.  
  12.     // true yada false true olarak kalabilir
  13.     $phpmailer->SMTPAuth = true;
  14.  
  15.     // SMTP port numarası - genellikle 25, 465 yada 587 oluyor
  16.     $phpmailer->Port = "587";
  17.  
  18.     // SMTP kullanıcı adınız
  19.     $phpmailer->Username = "[email protected]";
  20.  
  21.     // SMTP şifreniz
  22.     $phpmailer->Password = "şifre";
  23.  
  24.     // Şifreleme kullanıyor musunuz? - ssl yada tls tls kalmasını öneririm.
  25.     $phpmailer->SMTPSecure = "tls";
  26.  
  27.     $phpmailer->From = "YOLLAYAN MAIL";
  28.     $phpmailer->FromName = "YOLLAYANIN İSMİ";
  29. }
Advertisement
Add Comment
Please, Sign In to add comment