0
在我的應用程序中,我嘗試發送電子郵件但無法發送。在後端它顯示郵件正在發送,但在我的收件箱郵件不會來。 下面是我production.rb
文件 -無法在Ruby on Rails中發送電子郵件
# require 'tls_smtp'
Rails.application.configure do
config.cache_classes = false
config.eager_load = false
config.consider_all_requests_local = false
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
config.assets.debug = true
config.assets.digest = true
config.assets.raise_runtime_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { host: 'mail.abc.co.in', port: 3000 }
ActionMailer::Base.smtp_settings = {
:address => "mail.abc.co.in",
:port => 25,
:user_name => "[email protected]",
:password => "***",
:authentication => 'plain',
}
其仍無法正常工作。請幫助我。 –
你有沒有設置你的郵件服務器? – puneet18
make config.action_mailer.raise_delivery_errors = true並檢查錯誤日誌 – puneet18