Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. function send_email(){
  2. $this->load->library('Phpmailer_library');
  3. $mail = $this->phpmailer_library->load();
  4.  
  5. // SMTP configuration
  6. $mail->isSMTP();
  7. $mail->Host = 'mail.bantuanteknis.org';
  8. $mail->SMTPAuth = true;
  9. $mail->SMTPAutoTLS=false;
  10. $mail->Username = 'ementoring@bantuanteknis.org';
  11. $mail->Password = 'p3g3lnajarS';
  12. $mail->Port = 26;
  13.  
  14. $mail->setFrom('ementoring@bantuanteknis.org', 'Ementoring');
  15. $mail->addAddress('munazarbunda@gmail.com');
  16. $mail->Subject = 'coba';
  17. $mail->isHTML(true);
  18. $mail->Body = 'tes';
  19.  
  20. if ($mail->send()) {
  21. //all ok
  22. } else {
  23. $error_message = $mail->ErrorInfo;
  24. print_r($error_message);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement