CodeIgniter Forums
E-mail not always sent - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: E-mail not always sent (/showthread.php?tid=70822)



E-mail not always sent - lucavalentino - 06-04-2018

I'm trying to send emails, but I do not always receive emails

File config email
PHP Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

$config['smtp_port'] =25
$config
['smtp_timeout'] = 5;
$config['crlf'] = '\r\n';
$config['newline'] = '\r\n';
$config['wordwrap'] = FALSE;
$config['mailtype'] = 'html';
$config['charset'] = 'UTF-8';
$config['wordwrap'] = TRUE
File Controller
PHP Code:

 $message
'Data login',
 
$link_base=base_url('login');
 
$message=email_template($mess_email$link_base);
 
$this->email->from('[email protected]','Online service');
 
$this->email->to($email);
 
$this->email->subject(lang('subject_e'));
 
$this->email->message($message);
 $this->email->send();
 if(!$this->email->send()){
 
 $data['messaggio'] ='Errore';
   }
 else 
 { echo 'invio no'; }
 ... 
 var_dump($this->email->print_debugger());
PHP Code:
string(37"lang:email_no_from



Help me


RE: E-mail not always sent - InsiteFX - 06-04-2018

If all the emaails are sent then you have a email server problem on the hosting end not CodeIgniter.


RE: E-mail not always sent - lucavalentino - 06-04-2018

(06-04-2018, 03:47 AM)InsiteFX Wrote: If all the emaails are sent then you have a email server problem on the hosting end not CodeIgniter.

Sometimes it works. With Gmail OK.
With an Italian domain example Tiscali.it Not work. 

If I use Phpmailer I have no problems


RE: E-mail not always sent - lucavalentino - 06-04-2018

I solved this way:

PHP Code:
$this->email->from('[email protected]''Email test online ''email'); 



RE: E-mail not always sent - InsiteFX - 06-05-2018

Glad you got it working.