Guest User

Untitled

a guest
Apr 13th, 2018
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. function index() {
  2.  
  3. $config = Array(
  4. 'protocol' => 'smtp',
  5. 'smtp_host' => 'ssl://smtp.google.email.com',
  6. 'smtp_port' => 465,
  7. 'smtp_user' => 'example@gmail.com',
  8. 'smtp_pass' => '123456'
  9. );
  10.  
  11. $this->load->library('email', $config);
  12. $this->email->set_newline("\r\n");
  13.  
  14. $this->email->from('example@gmail.com', 'Willy Aguirre');
  15. $this->email->to('example@gmail.com');
  16. $this->email->subjet('Prueba de Correo');
  17. $this->email->message('Funciona, Genial :D!');
  18.  
  19. if ($this->email->send()) {
  20. echo 'Tu correo ha sido enviado';
  21. } else {
  22. show_error($this->email->print_debugger());
  23. }
  24. }
Add Comment
Please, Sign In to add comment