新手。看 agile web development with rails 3.2 时,卡在了发邮件的这一章,百度,google 无果,求助!
environment 里的设置:
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: "gmail.com",
authentication: "plain",
user_name: "[email protected]",
password: "password",
enable_starttls_auto: true
}
log 报错:
Completed 500 Internal Server Error in 2498ms
Errno::ECONNREFUSED (No connection could be made because the target machine actively refused it. - connect(2)):
app/controllers/orders_controller.rb:60:in `block in create'
app/controllers/orders_controller.rb:56:in `create'