$this->load->library (' email ');
$config [' protocol '] = ' smtp ';
Send to QQ user, to display Chinese with ' iso-8859-1 '
$config [' charset '] = ' iso-8859-1 ';
Sent to 163 users, to display Chinese with ' gb2312 '
$config [' charset '] = ' gb2312 ';
$config [' mailpath '] = ' news/index ';
$config [' smtp_host '] = ' smtp.163.com ';
$config [' smtp_user '] = ' example0624@163.com ';
$config [' smtp_pass '] = ' password ';
$this->email->initialize ($config);
$this->email->from (' example0624@163.com ', ' example ');
$this->email->to (' tosombody@qq.com ');
Set up cc www.2cto.com
$this->email->cc ();
Set Dark Send
$this->EMAIL->BCC ();
$this->email->subject ("The test of CodeIgniter ' s sending mail");
$this->email->message (' Hello, this is my test program. Do not reply to a message that was successfully sent through CodeIgniter. ');
Path needs to use absolute path
$this->email->attach (' d:/qcallserver/htdocs/ci/public/images/google.jpg ');
if ($this->email->send ()) {
Echo ' success ... ';
} else {
Echo ' failed ... ';
}
http://www.bkjia.com/PHPjc/477911.html www.bkjia.com true http://www.bkjia.com/PHPjc/477911.html techarticle $this-load-library (email), $config [Protocol] = SMTP,//Send to QQ user, to display Chinese with iso-8859-1 $config [charset] = iso-8859-1;// Send to 163 users, to display Chinese with gb2 ...