Guest User

Untitled

a guest
Apr 9th, 2017
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. require 'lib/mail_system/PHPMailerAutoload.php';
  2.  
  3. $mail = new PHPMailer;
  4.  
  5. $mail->SMTPDebug = 2; // Enable verbose debug output
  6.  
  7. $mail->isSMTP(); // Set mailer to use SMTP
  8. $mail->Host = 'n3plcpnl0078.prod.ams3.secureserver.net'; // Specify main and backup SMTP servers
  9. $mail->SMTPAuth = true; // Enable SMTP authentication
  10. $mail->Username = '[email protected]'; // SMTP username
  11. $mail->Password = 'mypassword'; // SMTP password
  12. $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
  13. $mail->Port = 465; // TCP port to connect to
  14.  
  15. $mail->setFrom('noreply@gamersside', 'Hesap İşlemleri');
  16. $mail->addAddress('ahmet.celikezer96@gmail'); // Add a recipient // Name is optional
  17.  
  18.  
  19.  
  20. // Optional name
  21. $mail->isHTML(true); // Set email format to HTML
  22.  
  23. $mail->Subject = 'Here is the subject';
  24. $mail->Body = 'This is the HTML message body <b>in bold!</b>';
  25. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  26.  
  27. if(!$mail->send()) {
  28. echo 'Message could not be sent.';
  29. echo 'Mailer Error: ' . $mail->ErrorInfo;
  30. } else {
  31. echo 'Message has been sent';
  32. }
  33. ?>e here
Advertisement
Add Comment
Please, Sign In to add comment