CI Frame Send mail

Source: Internet
Author: User
Tags config mail php code

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)}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.