Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. <?php
  2. header("content-type:text/html;charset=utf-8");
  3. date_default_timezone_set("Etc/GMT-8");
  4. require_once"class.smtp.php";
  5. require_once"class.phpmailer.php";
  6. $mail = new PHPMailer;
  7. $mail->IsSMTP(); // send via SMTP
  8. $mail->Host = "smtpdm.aliyun.com"; // SMTP servers
  9. $mail->PORT = 465;
  10. $mail->SMTPDebug = 2;
  11. $mail->SMTPAuth = true;
  12. $mail->Username = "web@info.jingdaninternet.com"; // SMTP username
  13. $mail->Password = "Mypassord"; // SMTP password
  14. $mail->From = "web@info.jingdaninternet.com";
  15. $mail->FromName = "Test"; //
  16. $mail->CharSet = "UTF-8"; //
  17. $mail->Encoding = "base64";
  18. $mail->AddAddress("info@jingdaninternet.com","Receiver");
  19. $mail->IsHTML(true); // send as HTML
  20. $mail->Subject = "New Message";
  21. $mail->Body = "Test";
  22. if(!$mail->Send())
  23. {
  24. echo "Wrong!";
  25. exit;
  26. }
  27. else {
  28. echo "Success!";
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement