Advertisement
Guest User

Untitled

a guest
Nov 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public function testmail()
  2. {
  3. $config = Array(
  4. 'protocol' => 'smtp',
  5. 'smtp_host' => 'ssl://smtp.googlemail.com',
  6. 'smtp_port' => 465,
  7. 'smtp_user' => 'yohanesivan111@gmail.com',
  8. 'smtp_pass' => 'passwordmu',
  9. 'mailtype' => 'html',
  10. 'charset' => 'iso-8859-1'
  11. );
  12. $this->load->library('email', $config);
  13. $this->email->set_newline("\r\n");
  14.  
  15. // Set to, from, message, etc.
  16. $this->email->from('yohanesivan111@gmail.com', 'Yohanes Ivan');
  17. $this->email->to('yohanesivan89@yahoo.com');
  18.  
  19. $this->email->subject('Email Test');
  20. $this->email->message('Testing the email class.');
  21. $result = $this->email->send();
  22.  
  23. echo $this->email->print_debugger();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement