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.
我嘗試在Exchange服務器上設置一個中繼連接器,以接受來自應用程序的IP地址的請求。
Also, my original problem was before I used NTLM and my config file looked like so but I got the same error:
而且,我最初的問題是在使用NTLM和配置文件之前,我的配置文件看起來是這樣的,但是我得到了相同的錯誤:
# 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.
我已經成功地使用Gmail的SMTP服務器發送郵件,所以我不認為它是Rails的方面,但是Exchange服務器不認可我的應用程序。
0
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).
原來我使用了錯誤的身份驗證,因為Exchange服務器不需要任何類型的身份驗證(主要是因為打印機、傳真等不需要身份驗證)。
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
}
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/08/10/724da08372e8655fba91a7cd8cfcd777.html。