Sending email issues

Sending email doesn’t work on localhost, only on real server.

If your server support mail function, you don’t need any special configuration.

If your server doesn’t support mail function then you can use external smtp, details for configuration:

You need to change no-reply email address in admin->settings->system settings to real existing email address or mails can be blocked.

You can also try this basic php sendmail example to see if your “mail” function on server works properly:

On some very specific server configuration “-f” flag can cause issues when using mail function. In this case you can open: system\libraries\Email.php , line around 1537:

if ($this->_safe_mode == TRUE)

Change it to:

if ($this->_safe_mode == TRUE || TRUE)

And save changes

Additional strange situation possible in system\libraries\Email.php:


If this doesn’t work then ask your hosting provider why email sending feature doesn’t work on this server and send link to example basic php sendmail example code.

Alternative Solution for SMTP if regular codeigniter method doesn’t work:

First you should have it configured for smtp, guides:

Download smtptester and extract to your server root directory near index.php

copy this custom_code

paste it like that:


And configure regular email config to send with smtp as described here: