title: Unable to send email using codeigniter-Error:Your server might not be configured to send mail using this method
body: <p>I am trying to send email from live server using domain email id. I tried with different port id, every time I got same error.My controller code is given below: </p>
  
  <pre><code>public function send_mail() {
              $this-&gt;load-&gt;library('email');
              $name = $this-&gt;input-&gt;post("name");
              $email = $this-&gt;input-&gt;post("email");
              $config['protocol'] = 'smtp';
              $config['smtp_host'] = 'mail.*******.com';
              $config['smtp_port'] = '465';
              $config['smtp_timeout'] = '7';
              $config['smtp_user'] = 'info@*******.com';
              $config['smtp_pass'] = '*********';
              $config['charset'] = 'utf-8';
              $config['newline'] = '\r\n';
              $config['mailtype'] = 'text'; // or html
              $config['validation'] = TRUE;
  
              $this-&gt;email-&gt;initialize($config);
              $this-&gt;email-&gt;from('info@*******.com', 'Hima');
              $this-&gt;email-&gt;to($email);
              $this-&gt;email-&gt;subject('email verification');
              $this-&gt;email-&gt;message('Verification Code');
              $send = $this-&gt;email-&gt;send();
              if ($send) {
                  $this-&gt;session-&gt;set_flashdata('msg','success');
              } else {
                  echo $error = $this-&gt;email-&gt;print_debugger();
              }
          }
  </code></pre>