The company that hosts my web site has disabled the fifth parameter in mail(), and it can´t be activated. I wonder why they would do that? Is it a security risk?
I use Codeigniter when I´m developing. When I use their mail library I get the following PHP warning: “mail(): Policy restriction in effect. The fifth parameter is disabled on this system”. I wonder how I should write my code so that I don´t get the warning.
This is what my code looks like today:
$this->load->library('email');
$this->email->from('My e-mail', 'Web site´s name');
$this->email->to('An e-mail');
$this->email->subject('A subject');
$this->email->message("A message");
if ($this->email->send()) { } else { }
What do I need to change to avoid the warning? Thanks for your help!
This is because PHP is running in Safe Mode, you can add ‘@’ before the function call causing the warning as there’s nothing much you can do (I guess you’re on a shared host).
Example:
Of course that’s only if it’s working WITH the warning.