EVOLUTION-NINJA
Edit File: Email_model.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Email_model extends CI_Model { /* @package CodeIgniter * @subpackage rest model class: email_model * @category Model * @Company JayBlues */ public function __construct() { parent::__construct(); } function sendEmail($from,$to,$name,$subject,$message) { /*$this->load->library('email'); $this->email->set_mailtype('html'); $this->email->from($from,$name); $this->email->to($to); $this->email->subject($subject); $this->email->message($message); $result=$this->email->send(); return $result;*/ $this->load->library('encrypt'); $this->load->library('email'); //SMTP & mail configuration $config = array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.com', 'smtp_port' => 465, 'smtp_user' => 'catabill.123@gmail.com', 'smtp_pass' => 'catabill123', 'mailtype' => 'html', 'charset' => 'utf-8' ); $this->email->initialize($config); $this->email->set_mailtype("html"); $this->email->set_newline("\r\n"); $this->email->to($to); $this->email->from($from,$name); $this->email->subject($subject); $this->email->message($message); //Send email return($this->email->send()); } }