Welcome Guest, Not a member yet? Register   Sign In
Email function doesn't work since 3 septembre 2015
#4

(11-21-2015, 02:35 PM)pcayrol Wrote: I don't have a application/config/email.php in my files (maybe a very old CI version).

By default this file is not present. You can create it. The file will automatically run.

I made a simple test runs.

PHP Code:
defined('BASEPATH') OR exit('No direct script access allowed');

class 
Test extends CI_Controller {
    
    
    function 
__construct()     {
        
parent::__construct();
        
$this->load->library('email');
    }
    
    public function 
index() {

        
$config['mailtype'] = 'html';
        
$config['charset'] = 'utf-8';
        
$config['newline'] = "\r\n";

        
$this->email->initialize($config);
    
        
$this->email->from('[email protected]','From Title condor');
        
$this->email->to('[email protected]'); 
        
$this->email->subject('Hello!'); 
        
$this->email->message('Message hello condor!'); 
        
$this->email->send();

        echo 
$this->email->print_debugger(); 

    }
    

Reply


Messages In This Thread
RE: Emill function doesn't work since 3 septembre 2015 - by condor - 11-22-2015, 05:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB