I've put my email configurations in the config.php but I don't know how I can access them in my controller.
In my config.php:
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.googlemail.com';
$config['smtp_user'] = 'username';
$config['smtp_pass'] = 'pass';
$config['smtp_port'] = '465';
$config['mailtype'] = 'html';
Should I make an instance of the super global object?
Thanks in advance.
You can access it with:
Also, see the relevant chapter in CodeIgniter User Guide
You don't put email config settings in config.php. You make a new file called email.php and place it in the config folder. CI will automatically detect the email config setting from that file.
Look under "Setting Email Preferences in a Config File"