Guest User

Untitled

a guest
Dec 9th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $config['protocol'] = 'smtp';
  2. $config['smtp_host'] = 'ssl://smtp.googlemail.com';
  3. $config['smtp_port'] = 465;
  4. $config['smtp_user'] = '*******@gmail.com'; // change it to yours
  5. $config['smtp_pass'] = '******'; // change it to yours
  6. $config['charset' ] = 'iso-8859-1';
  7. $config['newline' ] = "rn";
  8.  
  9. $config['mailtype' ] = 'text';
  10.  
  11. $config['validation' ] = TRUE;
  12. $this->load->library('email',$config);
  13.  
  14.  
  15.  
  16. $this->email->from('*********@gmail.com');
  17. $this->email->to('********@gmail.com');
  18. $this->email->subject('Confirmation Email');
  19. $this->email->message('Thank you');
  20.  
  21. if ($this->email->send())
  22. {
  23. echo "send successfully";
  24.  
  25.  
  26. }
  27. else
  28. {
  29. show_error($this->email->print_debugger());
  30. }
Add Comment
Please, Sign In to add comment