CodeIgniter Forums

Full Version: Password reset not working, form submission not working; Email not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Newbie here. Need help on the email configuration to get it working; the following email config is not working. 

$config['useragent'] = 'CodeIgniter';
$config['protocol'] = 'smtp';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['smtp_host'] = '';
$config['smtp_user'] = '';
$config['smtp_pass'] = 'mypassword';
$config['smtp_port'] = '587';
$config['smtp_crypto'] = 'tls';
$config['mailtype'] = 'html';
// $config['validate'] = TRUE;
// $config['priority'] = 3;
// $config['crlf'] = "\r\n";
$config['newline'] = "\r\n";
$config['charset'] = "utf-8";

Please advise how I can get this working. Thank you much Blush

When sending email, check the debug, it usually tells you why it couldn't send email:

PHP Code:
$this->email->send(false); // false attribute is important, otherwise debug data will be cleared after send action
echo $this->email->print_debugger(); 

This should point you to right direction why it fails.
yes, debugging will help. Also, you can talk to you hosting provider or check your Cpanel for email settings. For example,
$config['smtp_host'] = '';
must be

$config['smtp_host'] = '';

for the providers I work with.