title: CakePHP: send mail through SMTP to MS OUTLOOK -> SMTP Error: 504 5.7.4 Unrecognized authentication type
body: <p>I figured that I'll try to find out if I can send mails via cmd line before writing a question here. So I followed <a href="http://support.microsoft.com/kb/153119" rel="nofollow">these steps</a> and sent an e-mail by cmd to myself and a collegue of mine who's working on the same app I am. The message from cmd line came in the format it should have come.</p>
  
  <p>( internal app, should send mails only to my collegues' OUTLOOK accounts )</p>
  
  <p>Everything seems to be connected fine so I figured I have an error in my cakePHP code:</p>
  
  <p>Everything on mails code I have so far is this:</p>
  
  <p><strong>app/config/email.php</strong></p>
  
  <pre><code>public $smtp = array(
      'transport' =&gt; 'Smtp',
      'from' =&gt; array('from@test.sk'),
      'host' =&gt; 'ip_address_of_my_host',
      'port' =&gt; 25,
      'timeout' =&gt; 30,
      'username' =&gt; 'from@test.com',
      'password' =&gt; 'password',
      'client' =&gt; null,
      'log' =&gt; true,
      'charset' =&gt; 'utf-8',
      'headerCharset' =&gt; 'utf-8',
  );
  </code></pre>
  
  <p><strong>UsersController.php (test send mail function)</strong> </p>
  
  <pre><code>    public function test_send_email() {
          $this-&gt;autoRender = false;
          App::uses('CakeEmail', 'Network/Email');
          $email = new CakeEmail('smtp');
          $email-&gt;from(array('from@test.com' =&gt; 'APP TEST'));
          $email-&gt;to('me@test.com');
          $email-&gt;subject('Subject of testing');
          $email-&gt;send('Message of testing');
      }
  </code></pre>
  
  <p>After 5 seconds of loading I get: <strong><em>SMTP Error: 504 5.7.4 Unrecognized authentication type</em></strong></p>