Welcome Guest, Not a member yet? Register   Sign In
about email library
#1

(This post was last modified: 08-15-2015, 07:03 AM by seasenx6.)

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.
Reply
#2

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?
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!
Reply
#3

You need to set your Email Preferences:

See Here
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

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.
Reply
#5

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

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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

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




Theme © iAndrew 2016 - Forum software by © MyBB