Advertisement
Guest User

Untitled

a guest
Aug 14th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. $config = Array(
  2. 'protocol' => 'smtp',
  3. 'smtp_host' => 'ssl://smtp.gmail.com',
  4. 'smtp_port' => 465,
  5. 'smtp_user' => 'dkumara85@gmail.com', //email id
  6. 'smtp_pass' => 'xxxxxxxxxxx', // password
  7. 'mailtype' => 'html',
  8. 'charset' => 'iso-8859-1'
  9. );
  10. $this->load->library('email', $config);
  11. $this->email->set_newline("rn");
  12.  
  13. $this->email->from('dkumara85@gmail.com','my name');
  14. $this->email->to("dkumara85@gmail.com"); // email array
  15. $this->email->subject('email subject');
  16. $this->email->message("my mail body");
  17.  
  18. $result = $this->email->send();
  19.  
  20.  
  21. show_error($this->email->print_debugger()); // for debugging purpose :: remove this once it works...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement