$this->load->model('emailmodel');
$query = $this->emailmodel->get_emails();
$emails = array();
set_time_limit(0);
foreach($query->result() as $u)
{
$this->notification->send($u->to, $this->config->item('neworder'),'orders/mail/subscription',
array(
'order' => $neworder,
'user' => $user
));
break;
}
so I am sending mail in a loop for each subscribed user, but it gives me an error:
Could not execute mail delivery program '/usr/sbin/sendmail -t -i '
how to fix this?
I think your system doesn't support sendmail in that path.. You have to change the sendmail path or reinstall it and be sure that your queue mail isnot overloaded...
We had the same problem. please check the security limits on your system (ulimit)
You can execute ulimit -a
bash# ulimit -a
...
open files (-n) 1024
max user processes (-u) 1024
...
You can change this on RedHat in /etc/security/limits.conf We have change the nproc and nofile to a bigger value.
Because each mail() call opens a port(file). If you reach the Filelimit this errormessage occurs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With