I have this issue: trying to make admin panel and there i have the inputs of user and pass of SMTP account and i need to make it as secure as possible before sending it to DB, and i'm doing like this:
$config = array(
'protocol' => 'smtp',
'smtp_host' => Settings_model::$db_config['smtp_host'],
'smtp_port' => Settings_model::$db_config['smtp_port'],
'smtp_user' => $this->encrypt->decode(Settings_model::$db_config['smtp_user']),
'smtp_pass' => $this->encrypt->decode(Settings_model::$db_config['smtp_pass']),
'smtp_timeout' => 30,
'charset' => "utf-8",
'newline' => "\r\n"
);
and i got this error :
Fatal error: Using $this when not in object context in /application/helpers/send_email_helper.php on line 29
for this lines:
'smtp_user' => $this->encrypt->decode(Settings_model::$db_config['smtp_user']),
'smtp_pass' => $this->encrypt->decode(Settings_model::$db_config['smtp_pass']),
Any ideas? i don't want to expose the pass and user in files. Thanks in advance!