title: Unable to send email using PHP SMTP, Failed to send AUTH LOGIN command. Error
body: <p>I have been trying for last 3 days to resolve the issue and have searched many websites and stackoverflow question but it seems my code is perfect but still it is not working.</p>
  
  <pre><code>function send_email(){
      $this-&gt;load-&gt;library('email');
      $config['protocol'] = "smtp";
      $config['smtp_host'] = "mail.shadowmail.com.au";
      $config['smtp_port'] = 587;
  
      $config['smtp_timeout']='30';
  
      $config['smtp_user'] = "my email id here "; //
      $config['smtp_pass'] = "******";
  
      $this-&gt;email-&gt;initialize($config);
      $this-&gt;email-&gt;set_newline("\r\n");
      $this-&gt;email-&gt;from("my email id here ", "Test");
  
      $this-&gt;email-&gt;to("jack@gmail.com");
  
      $this-&gt;email-&gt;subject("heading");
      $this-&gt;email-&gt;message("heyyyyyyyyyyyy");
      if($this-&gt;email-&gt;send()){
          echo "done";
      }else{echo "fail";
          show_error($this-&gt;email-&gt;print_debugger());
      }
  }
  </code></pre>
  
  <p>This error I am getting</p>
  
  <pre><code>220 Sol1-SMEX01.shadowmail.sol1 Microsoft ESMTP MAIL Service ready at Thu, 18 Jan 2018 10:39:18 +1100 
  
  hello: 250-Sol1-SMEX01.shadowmail.sol1 Hello [1.136.213.103]
  250-SIZE 41943040
  250-PIPELINING
  250-DSN
  250-ENHANCEDSTATUSCODES
  250-AUTH GSSAPI NTLM
  250-8BITMIME
  250-BINARYMIME
  250 CHUNKING
  Failed to send AUTH LOGIN command. Error: 504 5.7.4 Unrecognized authentication type 
  Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
  Date: Thu, 18 Jan 2018 00:39:28 +0100
  From: "Test" &lt;my email id was here , i just replaced it with this text&gt;
  Return-Path: &lt;my email id was here , i just replaced it with this text&gt;
  To: jack@gmail.com
  Subject: =?UTF-8?Q?heading?=
  Reply-To: &lt;my email id was here , i just replaced it with this text&gt;
  User-Agent: CodeIgniter
  X-Sender: my email id was here , i just replaced it with this text
  X-Mailer: CodeIgniter
  X-Priority: 3 (Normal)
  Message-ID: &lt;5a5fdeb00e005@example.com&gt;
  Mime-Version: 1.0
  
  
  Content-Type: text/plain; charset=UTF-8
  Content-Transfer-Encoding: 8bit
  
  heyyyyyyyyyyyy
  </code></pre>
  
  <p>It could be basic question for you but I have been trying for last 3 days and still getting same error. It seems code is ok, might be something is wrong I am unable to identify. 
  My email id and password are correct, I have logged in many times to verify that credentials are working. </p>