How to configure Microsoft Exchange Server using ActionMailer

Hi Guys,

I’m having some hard time to configure the Microsoft Exchange server, however if I used the the GMAIL server the mail was successfully sent to the target user. I also tried this one http://www.breckenedge.com/2011/07/configuration-of-ruby-on-rails-actionmailer-for-microsoft-exchange-smtp/ but still it doesn’t work.

BTW, This is my configured ActionMailer.

  config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "mail.example.com",
port: 110,
domain: "my.domainame.com",
authentication: :login,
enable_starttls_auto: true,
user_name: "my_username",
password: "my_password"
}

I always got this error.

Thanks.

What error?

Colin

For Exchange server, you need to follow the steps found in that mentioned blog.

By default, Exchange server uses his own authentication protocol kerberos, not plain text… so you need to use :ntlm, not :login on authentication. You still can change this, but need to change the entire Exchange Server configuration, check with your Exchange Server administrator…

  config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "[mail.example.com](http://mail.example.com/)    ",
port: 110, #I'm not sure if the port need to be 25 or 110... it depends of which port your Exchange listens, usually 25, but there are strong recommendations to use 110, letting port 25 free for smtp communication between smtp servers only.
domain: "[my.domainame.com](http://my.domainame.com/)    ",
authentication: :**ntlm**    ,
enable_starttls_auto: true,
user_name: "my_username",
password: "my_password"
}