title: ¨504 5.7.4 Unrecognized authentication type¨ Rails app to MS Exchange
body: <p>My question is very similar to <a href="https://stackoverflow.com/questions/4588234/unrecognized-authentication-type-when-doing-an-auth-to-exchange-from-rails">this one</a> but the accepted answer has not solved my problem.</p>
  
  <p>Here is what I have for my config file:</p>
  
  <pre><code># Config for mailserver
  config.active_support.deprecation = :notify
  config.action_mailer.delivery_method = :smtp
  # SMTP settings for Exchange server
  config.action_mailer.smtp_settings = {
    :address            =&gt; 'outlook.&lt;domain&gt;',
    :port               =&gt; 25,
    :authentication     =&gt; :ntlm,
    :user_name          =&gt; '&lt;userName&gt;@&lt;domain&gt;',
    :password           =&gt; '&lt;unencryptedPassword',
    :domain             =&gt; '&lt;domain&gt;',
    :enable_starttls_auto =&gt; true
  }
  </code></pre>
  
  <p>I have tried <a href="http://blogs.technet.com/b/exchange/archive/2006/12/28/3397620.aspx" rel="nofollow noreferrer">setting up a relay connector</a> on the Exchange server to accept requests from the IP address of my application. </p>
  
  <p>Also, my original problem was before I used NTLM and my config file looked like so but I got the same error:</p>
  
  <pre><code># Config for mailserver
  config.active_support.deprecation = :notify
  config.action_mailer.delivery_method = :smtp
  # SMTP settings for Exchange server
  config.action_mailer.smtp_settings = {
    :address            =&gt; 'outlook.&lt;domain&gt;',
    :port               =&gt; 25,
    :authentication     =&gt; :login,
    :user_name          =&gt; '&lt;userName&gt;@&lt;domain&gt;',
    :password           =&gt; '&lt;unencryptedPassword',
    :domain             =&gt; '&lt;domain&gt;',
    :enable_starttls_auto =&gt; true
  }
  </code></pre>
  
  <p>I have successfully been able to send email using Gmail's SMTP server so I don't think it's the Rails side, but the Exchange server not recognizing my application. </p>