Email Library |
Dear all,
I hope you are fine. My name is Murat and I'm here to learn and get some help on codeigniter. I'm someone with very basic coding skills. I've been requested to correct a problem on an codeigniter application. System suddenly stop to send cron jobs notifications and email are not sent using the configuration under config/email.php but the server (!)... I tried to look everywhere and I see everytime I have a code for mail sending it refers to $this->load->library('email'); or $this->load->helper('email'); I checked in Library Folder and Helper Folder and dont have any email configuration. Do you have any idea how can I solve this?
Did you check CodeIgniter documentation on Email?
Btw, it's neither under Library nor Helper folder, it's under Config folder.
Dear demyr,
Thank you for your answer. Yes I have checked and configurated the mail config file accordingly but still nails are being sent by the host and not my o365 account.
Dear BilltheCat,
my bad Please see the content: <?php $config['protocol'] = 'smtp'; //$config['mailpath'] = '/usr/sbin/sendmail_r -t -i [email protected]'; //$config['mailpath'] = '/usr/sbin/sendmail -t -i'; //$config['mailpath'] = '/usr/sbin/sendmail'; //$config['smtp_host'] = 'localhost'; $config['smtp_host'] ='smtp.office365.com'; $config['smtp_user']='[email protected]'; $config['smtp_pass']='password'; $config['smtp_port']=587; $config['sendmail_from'] ='[email protected]'; $config['crlf'] = '\r\n'; $config['mailtype'] = 'html'; $config['wordwrap'] = TRUE; // $this->email->initialize($config); // only if used in the application directly and not in the config. and the content of the cron file: $content.='</ul><p>Thanks for your cooperation. We also remind that the CAP are actually followed by '.$data['name']['customer'].'. Thus you should contact with them for issues related to the CAP. In case of problem related to this website, then you should contact WethicA.<br> Best regards.<br> WethicA\'s team.</p>'; echo'<br>'.$content; $this->load->library('email'); $this->email->from('[email protected]', 'XXX'); echo'<br>'.$data['email']['factory']; $this->email->to($data['email']['factory'].','.$data['email']['agent']); $this->email->cc($data['email']['customer']); $this->email->bcc(EMAIL_MANAGER); $this->email->subject($title); $this->email->message($content); $i++; if(!$this->email->send()) die($this->email->print_debugger()); } // end of one specific line } // end of foreach line |
Welcome Guest, Not a member yet? Register Sign In |