CodeIgniter Forums
about email library - 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: about email library (/showthread.php?tid=62688)



about email library - seasenx6 - 08-15-2015

I try to using email.

my code

PHP Code:
public function sendEmail () {
    
$this->load->library('email');

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

    
$this->email->subject('Email Test');
    
$this->email->message('Testing the email class.');

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


It not work and don't have anything display on website.
Pls recommend for help.


RE: about email library - RobertSF - 08-15-2015

If you get a completely blank screen even though you also have other text to display, then I believe the problem is that you have a fatalĀ error and error reporting is turned off. Do you ever get other PHP error messages?


RE: about email library - InsiteFX - 08-15-2015

You need to set your Email Preferences:

See Here


RE: about email library - seasenx6 - 08-16-2015

I set follow code here

PHP Code:
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;

$this->email->initialize($config); 

it error :

Exit status code: 1
Unable to open a socket to Sendmail. Please check settings.
Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.


RE: about email library - MUGA - 08-16-2015

am getting the same problem even if i use smpt protocol, am using wamp server


RE: about email library - InsiteFX - 08-16-2015

Are you trying to send from your local host? If so then you need to setup your mail parameters in your php.ini file.

I use smtp on my local host and set everything in php.ini to my comcast smtp server for sending from local host.


RE: about email library - seasenx6 - 08-16-2015

OK, I get it thank a lot :'))