Codeigniter email sending with gmail smtp with codeigniter email library
class email1 extends MY_Controller { function __construct() { parent::__construct(); } function index() { //$this->load->view('temp/templatesec'); $this->load->library('email'); $config['protocol'] = 'smtp'; $config['smtp_host'] = 'ssl://smtp.gmail.com'; $config['smtp_port'] = '465'; $config['smtp_timeout'] = '7'; $config['smtp_user'] = '1515shashitest187@gmail.com'; $config['smtp_pass'] = 'xxxxxxxxxx'; $config['charset'] = 'utf-8'; $config['newline'] = "\r\n"; $config['mailtype'] = 'text'; // or html $config['validation'] = TRUE; // bool whether to validate email or not