Welcome Guest, Not a member yet? Register   Sign In
email not sending
#3

(This post was last modified: 08-04-2018, 03:38 AM by kvanaraj.)

(08-04-2018, 02:58 AM)InsiteFX Wrote: This is wrong.

PHP Code:
$this->load->library('email',$config); 

Should be some thing like this

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

// see the User's Guide for setting these.
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;

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

An Error Was Encountered

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.


public function index()

{

//$this->load->view('welcome_message');

/*$config = array(

'protocol'=> 'smtp',

'smtp_host' => 'ssl://smtp.googlemail.com',

'smtp_port' => 465,

'driver' => 'sendmail',

'smtp_user' => '***@gmail.com',

'smtp_pass' => '*****'

);*/



//$this->load->library('email',$config);

$this->load->library('email');

$config['protocol'] = 'sendmail';

$config['mailpath'] = '/usr/sbin/sendmail';

$config['charset'] = 'iso-8859-1';

$config['wordwrap'] = TRUE;



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



$this->email->set_newline("\r\n");

$this->email->from('*****@gmail.com','kvr');

$this->email->to('****@gmail.com');

$this->email->subject('test mail');

$this->email->message('working');



$path = $this->config->item('server_root');

//echo $path;

//die();



if($this->email->send())

{

echo 'mail sent';

}

else

{

show_error($this->email->print_debugger());
}


Attached Files
.php   Email.php (Size: 56.27 KB / Downloads: 109)
Reply


Messages In This Thread
email not sending - by kvanaraj - 08-03-2018, 11:31 PM
RE: email not sending - by InsiteFX - 08-04-2018, 02:58 AM
RE: email not sending - by kvanaraj - 08-04-2018, 03:34 AM
RE: email not sending - by Paradinight - 08-04-2018, 10:56 PM
RE: email not sending - by kvanaraj - 08-05-2018, 09:35 PM
RE: email not sending - by InsiteFX - 08-07-2018, 03:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB