Welcome Guest, Not a member yet? Register   Sign In
Sending Email Not Working
#1

[eluser]renga[/eluser]
I used

$this->load->library('email'); in my project . Mails are not working properly ... can anyone suggest what the problem is?
#2

[eluser]Clooner[/eluser]
Maybe your code and or your mail settings are the problem Big Grin
[quote author="renga" date="1238152345"]I used $this->load->library('email'); in my project . Mails are not working properly ... can anyone suggest what the problem is?[/quote] What is the error you are getting, what happens, what does not, what are your email settings and what is your code? Sure that your code is more then the
Code:
$this->load->library('email');
#3

[eluser]renga[/eluser]
[quote author="clooner" date="1238154279"]Maybe your code and or your mail settings are the problem Big Grin
[quote author="renga" date="1238152345"]I used $this->load->library('email'); in my project . Mails are not working properly ... can anyone suggest what the problem is?[/quote] What is the error you are getting, what happens, what does not, what are your email settings and what is your code? Sure that your code is more then the
Code:
$this->load->library('email');
[/quote]

It shows No Error ....

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


this code shows that mail sent ...... but really mails are not sent
#4

[eluser]Clooner[/eluser]
[quote author="renga" date="1238155023"][quote author="clooner" date="1238154279"]Maybe your code and or your mail settings are the problem Big Grin
[quote author="renga" date="1238152345"]I used $this->load->library('email'); in my project . Mails are not working properly ... can anyone suggest what the problem is?[/quote] What is the error you are getting, what happens, what does not, what are your email settings and what is your code? Sure that your code is more then the
Code:
$this->load->library('email');
[/quote]

It shows No Error ....

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


this code shows that mail sent ...... but really mails are not sent[/quote]

Post your settings and your code here. Otherwise I'll stick to that the problem is your settings and or your code Big Grin
#5

[eluser]renga[/eluser]
if ($this->form_validation->run() == FALSE) {

$this->load->view('register.tpl', $data);
}
else {
$this->load->model('registration_model');
$chk_register = $this->registration_model->register($_POST);
if($chk_register == true) {

$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->from('[email protected]', 'Enexions');
$this->email->to('E_mail');
$this->email->subject('Email Test');
$this->email->message('Testing the email class.');
$this->email->send();
echo $this->email->print_debugger();
$data['Success'] = "Account Activated Successfully !";
$this->load->view('register.tpl', $data);
}
else {
redirect('/register','refresh');
}
}
#6

[eluser]Clooner[/eluser]
Code:
if ( ! $this->email->send())
{
    $errors=$this->email->print_debugger();
   die($errors);
} else
{
   // success here
   die('it worked');
}
. instead of
Code:
$this->email->send();

What happens now? And what happens when you try using a different protocol, does it work then? Is sendmail working correctly?
#7

[eluser]renga[/eluser]
It shows that it worked ...... but mails are not sent ...... when i using SMTP same problem arises
#8

[eluser]Clooner[/eluser]
[quote author="renga" date="1238160658"]It shows that it worked ...... but mails are not sent ...... when i using SMTP same problem arises[/quote] What do your log files say? sendmail log say? (you might need to enable this first) is sendmail accessed?
#9

[eluser]renga[/eluser]
[quote author="clooner" date="1238162829"][quote author="renga" date="1238160658"]It shows that it worked ...... but mails are not sent ...... when i using SMTP same problem arises[/quote] What do your log files say? sendmail log say? (you might need to enable this first) is sendmail accessed?[/quote]

how to view my log files?????????????
#10

[eluser]Clooner[/eluser]
First your CI log files which you have to enable in your config file and google about sendmail there are some good pages about that.




Theme © iAndrew 2016 - Forum software by © MyBB