Ci框架 邮件类发送邮件

 
        public function mail()
        {
                $config['protocol']     = 'smtp';
                $config['smtp_host']    = 'smtp.qq.com';
                $config['smtp_user']    = '[email protected]';
                $config['smtp_pass']    = '********';
                $config['smtp_port']    = '25';
                $config['charset']      = 'utf-8';
                $config['mailtype']     = 'text';
                $config['smtp_timeout'] = '5';
                $config['newline']      = "\r\n";
                 
                $this->load->library ('email', $config);
                $this->email->from ('[email protected]', 'hello');
                $this->email->to ('[email protected]', 'xxxx');
                $this->email->subject ('Test subject');
                $this->email->message ('The content');
                $this->email->send ();
 
                // echo $this->email->print_debugger();
        }


你可能感兴趣的:(ci框架)