class Test extends Controller
{
function __construct()
{
parent::__construct();
$this->load->library('email');
}
function index()
{
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.gmail.com';
$config['smtp_user'] = 'eric.chang.zmm@gmail.com';
$config['smtp_pass'] = 'ericchangzmm';
$config['smtp_port'] = '465';
$config['smtp_timeout'] = '5';
$config['newline'] = "\r\n";
$config['crlf'] = "\r\n";
$this->email->initialize($config);
$this->email->from('eric.chang.zmm@gmail.com', 'eric');
$this->email->to('zmm_eric@126.com');
$this->email->subject('subject');
$this->email->message('this is the mail content');
$this->email->send();
}
}