CodeIgniter Forums
email not working no_from - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: email not working no_from (/showthread.php?tid=69681)



email not working no_from - flav - 01-04-2018

Hi,

I use email library for my project. When I want to send an email, the debugger show this message : "lang:email_no_from"
My server use WAMP 3.1.0 and PHP 5.6.31.

My test code :
PHP Code:
$this->load->library('email');

$this->email->from('[email protected]');
$this->email->to('[email protected]');


$this->email->subject('Email Test');
$this->email->message('Hello World !');


$config['smtp_host'   '172.20.2.2';
$config['smtp_port'   '25';

$this->email->initialize();

if(
$this->email->send()){
 
           echo 'OK';
 
       }else{
 
           echo $this->email->print_debugger(); 

Do you know what this error means ?
Thanks,


RE: email not working no_from - ivantcholakov - 01-04-2018

Check the line

$this->email->initialize();