Advertisement
Guest User

Untitled

a guest
Mar 14th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <?php
  2. require 'PHPMailerAutoload.php';
  3.  
  4. $mail = new PHPMailer;
  5.  
  6. $mail->isSMTP(); // Set mailer to use SMTP
  7. $mail->Host = 'mail.dafdasfds.e-cbncloud.co.id'; // Specify main and backup SMTP servers
  8. $mail->SMTPAuth = true; // Enable SMTP authentication
  9. $mail->Username = 'adddd@dafdasfds.e-cbncloud.co.id'; // SMTP username
  10. $mail->Password = 'admin1234'; // SMTP password
  11. $mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
  12. $mail->Port = 25;
  13. $mail->From = 'adddd@dafdasfds.e-cbncloud.co.id';
  14. $mail->FromName = 'Mailer';
  15. $mail->addAddress('cbncloud@yahoo.com');
  16. // Add a recipient
  17.  
  18. // Optional name
  19. $mail->isHTML(true); // Set email format to HTML
  20.  
  21. $mail->Subject = 'Here is the subject';
  22. $mail->Body = 'This is the HTML message body <b>in bold!</b>';
  23. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  24.  
  25. if(!$mail->send()) {
  26. echo 'Message could not be sent.';
  27. echo 'Mailer Error: ' . $mail->ErrorInfo;
  28. } else {
  29. echo 'Message has been sent';
  30. }
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement