我正在使用catarse平台开发一个应用程序,我想向用户发送一封电子邮件,要求他们成为项目团队的一员。 我正在使用动作邮件程序。在我的rails控制台中,我可以看到该邮件已成功发送,但它未被发送到收件人的收件箱或span文件夹。 这是我的development.rb
Catarse::Application.configure do
Slim::Engine.set_default_options pretty: true
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# mailcatcher configs
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "gmail.com",
:authentication => :login,
:user_name => *******,
:password => *******,
}
end
答案 0 :(得分:0)
答案 1 :(得分:0)
你可以发送你已经定义了发送邮件功能的邮件文件的快照,
实际上我想看看你是否定义了
default_from: test123@example.com
您可以在邮件程序文件或development.rb / production.rb
中定义default_from为ActionMailer::Base.default :from => 'test123@example.com'