调试了很久,最后终于可以发送了
1 在config/environments/development.rb文件里配置邮件信息
config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => "smtp.163.com", :port => 25, :domain => '163.com', :user_name => '你的邮箱登陆账号',#例如 xxx@163.com :password => '你的密码', :authentication => :login, }