Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class MY_Controller extends CI_Controller {
  4.  
  5. public function _send_mail($to,$subjet,$message,$cc=null)
  6. {
  7. $this->load->library('email');
  8. $this->email->from(config_item('smtp_user'), config_item('sender_name'));
  9. $this->email->to($to);
  10. if ($cc !== null) $this->email->cc($cc);
  11. $this->email->reply_to(config_item('reply_to'));
  12. $this->email->set_alt_message('You need to HTML supported web browser or email client to display this email');
  13. $this->email->subject($subject);
  14. $this->email->message($message);
  15.  
  16. if ($this->email->send(FALSE)) return true;
  17. else { return $this->email->print_debugger(); $this->email->clear(TRUE); }
  18. }
  19.  
  20. }
  21.  
  22. /* End of file MY_Controller.php */
  23. /* Location: ./application/core/MY_Controller.php */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement