Reputation: 1273
My question is very similar to this one but the accepted answer has not solved my problem.
Here is what I have for my config file:
# 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 => 'outlook.<domain>',
:port => 25,
:authentication => :ntlm,
:user_name => '<userName>@<domain>',
:password => '<unencryptedPassword',
:domain => '<domain>',
:enable_starttls_auto => true
}
I have tried setting up a relay connector on the Exchange server to accept requests from the IP address of my application.
Also, my original problem was before I used NTLM and my config file looked like so but I got the same error:
# 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 => 'outlook.<domain>',
:port => 25,
:authentication => :login,
:user_name => '<userName>@<domain>',
:password => '<unencryptedPassword',
:domain => '<domain>',
:enable_starttls_auto => true
}
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.
Upvotes: 3
Views: 6700
Reputation: 1273
Turns out I was using the wrong authentication because the Exchange server doesn't require any sort of authentication (mainly so printers, faxes, etc. don't need to authenticate).
Here's the resulting settings I used:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => 'outlook.<domain>',
:port => 25,
:authentication => :plain,
:enable_starttls_auto => true
}
Upvotes: 2