I have an application in a server that send emails, the email works in localhost but is weird that in the server only works in the mornings and then the emails are not sending in the afternoons, this is my email.php
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['smtp_host'] = "smtp.exchangeadministrado.com";
$config['smtp_user'] = "MyMail.com";
$config['smtp_pass'] = "MyPass";
$config['smtp_port'] = "587";
$config['smtp_timeout'] = "30";
$config['smtp_keepalive'] = TRUE;
$config['smtp_crypto'] = "tls";
$config['charset'] = "utf-8";
$config['mailtype'] = "html";
$config['crlf'] = "\r\n";
$config['newline'] = "\r\n";
This is the email part of the Controller:
$htmlContent = $this->load->view('emailExpo_view',$data,true);
$this->email->set_crlf( "\r\n" );
$this->email->to(implode(', ', array($correoCliente1, $correoCliente2, $correoCliente3)));
$this->email->from('status.embarques@autotransportecari.com');
$this->email->cc($adresses);
$this->email->subject('Actualización de Exportación');
$this->email->attach(FCPATH . "imagenes/cari.png", "inline");
$this->email->message($htmlContent);
$this->email->send();
I Know that this is very weird because the email works only in a range of hours and then stop working. I don´t have any other configuration, the app works fine in the mornings but then the emails are not sent but when I print the email debbuger I have this mesage: "Your message has been successfully sent using the following protocol: sendmail" but actually is not sent. Do you have any aidea whyI have this issue?