title: SMTP error: 220 smtpauth.net4india.com ready Unable to send email using PHP SMTP. Your server might not be configured
body: <pre><code>public function send_mail()
  {
      $this-&gt;CI-&gt;load-&gt;library('email');
      $config = array(
          'protocol'  =&gt; 'smtp',
          'smtp_host' =&gt; 'smtpauth.net4india.com',
          'smtp_port' =&gt; 587,
          'smtp_user' =&gt; 'xxxxx@my_domain.in',
          'smtp_pass' =&gt; 'xxxxxxxx',
          'newline'   =&gt; '\r\n',
          'mailtype'  =&gt; 'html',
          'charset'   =&gt; 'utf-8'
      );
      $this-&gt;CI-&gt;email-&gt;initialize($config);
      $this-&gt;CI-&gt;email-&gt;set_mailtype("html");
      $this-&gt;CI-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;CI-&gt;email-&gt;from('info@my_domain.in', 'My Domain');
      $this-&gt;CI-&gt;email-&gt;to('xxxx@gmail.com');
      $this-&gt;CI-&gt;email-&gt;subject("Test Subject");
      $this-&gt;CI-&gt;email-&gt;message('Test Content');
      if(!$this-&gt;CI-&gt;email-&gt;send())
      {
          $error = $this-&gt;CI-&gt;email-&gt;print_debugger();
          echo "&lt;pre&gt;"; print_r($error); echo "&lt;/pre&gt;"; exit;
          return false;
      }
      return true;
  }
  </code></pre>
  
  <p>I have my domain and email registered to net4india.com, and hosting at godaddy.</p>
  
  <p>Using the above code i'm able to send mail from my localhost but not able to send from godaddy server. </p>
  
  <p>I have added mx records in godaddy hosting.
  Changed the routing to remote manager.</p>
  
  <p>I did lots of googling still ends up with no solution.</p>