CI Framework has Send mail class: Specific can see the manual, about the mail configuration file, I put in a separate file, easy to maintain
The file name is: email.php, this file is saved to application/config/email.php, and then the controller is loaded with $this->load->library ("email"), so there is no need to use $this- >email->initialize () function to initialize parameters.
PHP code
<?php
$config ["protocol"] = "SMTP";
$config ["smtp_host"] = "smtp.163.com";
$config ["smtp_user"] = "email address";
$config ["smtp_pass"] = "*******";
$config ["mailtype"] = "html";
$config ["Validate"] = true;
$config ["priority"] = 1;
$config ["CRLF"] = "\ r \ n";
$config ["smtp_port"] = 25;
$config ["charset"] = "gb2312";
$config ["wordwrap"] = TRUE;
<?php
$config ["protocol"] = "SMTP";
$config ["smtp_host"] = "smtp.163.com";
$config ["smtp_user"] = "email address";
$config ["smtp_pass"] = "*******";
$config ["mailtype"] = "html";
$config ["Validate"] = true;
$config ["priority"] = 1;
$config ["CRLF"] = "\ r \ n";
$config ["smtp_port"] = 25;
$config ["charset"] = "gb2312";
$config ["wordwrap"] = TRUE;
View Critical Code:
HTML code
<form action= "<?php echo Base_url ();? >content/sendmail.html "method=" POST ">
<input type= "hidden" name= "number" value= "<?php Echo $this->uri->segment (3);? > "/>
<input type= "hidden" name= "url" value= "<?php EchoCI frame send mail-webmaster College the future Chinese webmaster, more focused on the development of China's network AD Service latest updates add Favorites set as homepage
- Home
- Internet Software
- IDC Products
- Webmaster Trading
- Project Outsourcing
- Business Information
- Recruitment job
- Company Library
- Information
- Download
- College
- Tools
- Forum
Hot Keywords:CSS layout color reference Dreamweaver8 APACHEAPACHEIIS6AJAXWML Home Webmaster Home Webmaster Introduction Operation planning Search optimization website profit web design Html css/xhtml Dhtml WAP Dreamweaver design principle plane animation Photoshop Firework Flash website Development Asp. Net Php Jsp Mssql Access Oracle Mysql server Fressbsd LINUX Windows
Video Tutorials |
Common Manuals |
Common Advertising Code |
JS Special effects Code |
Webmaster College >> Website Development Technology Tutorials >> PHP Tutorials >> ci framework send mail
CI Frame Send mail
2011-2-10 18:18:00 View learning experience {GetProperty (Content)}