I am working on email functionality, for that i have set SMTP, email is working for gmail, but for the email providers mail is going to spam folder, can anyone please help what i need to do to resolve that issue ? here is my code for that

```
$config['protocol'] = 'smtp'; 
            $config['smtp_host'] = SMTP_HOST; 
            $config['smtp_user'] = SMTP_USER; 
            $config['smtp_pass'] = SMTP_PASSWORD; 
            $config['smtp_port'] = '587';
            $config['charset'] = 'utf-8';
            $config['wordwrap'] = TRUE;

            $this->load->library('email', $config);

            $this->email->set_header('Content-Type', 'text/html');

            $this->email->from(FROM_EMAIL);
            $this->email->to($email);
            $this->email->set_newline("\r\n");
            $this->email->set_mailtype("html");
            $this->email->subject("Test email");
            $this->email->message("Testing Mail received.");

            if($this->email->send()){
                echo "Email send.";
            } else {
                echo "Error";
            }

```