Posts

Showing posts from May, 2016

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           

Codeigniter - Sending email with gmail smtp with codeigniter email library

class email2 extends MY_Controller {     function __construct()     {         parent::__construct();     }     function index()     {     $config = array();                 $config['useragent']           = "CodeIgniter";                 $config['mailpath']            = "/usr/bin/sendmail"; // or "/usr/sbin/sendmail"                 $config['protocol']            = "smtp";                 $config['smtp_host']           = "ssl://smtp.gmail.com";                 $config['smtp_port']           = "465";                 $config['smtp_user']    = "xxxxx@gmail.com";                 $config['smtp_pass']    = "xxxxx";                 $config['mailtype'] = 'html';                 $config['charset']  = 'utf-8';                 $config['newline']  = "\r\n";                 $config['wordwrap'] = TRUE;