devise.rb – 调用send_reset_password_instructions时的Net :: SMTPSyntaxError

我在调用send_reset_password_instructions({:email => 'my@email.com'})设计助手时收到Net::SMTPSyntaxError 501 Syntax Error 。 我使用Ruby 1.9.3,Rails 3.2.19并设计2.2.8。

调用函数的片段:

 class UserController def reset User.send_reset_password_instructions(hash_params) # {:email => 'my@email.com'} # ... more code down here ... end end 

User类激活了以下设计模块:

 class User ... devise :registerable, :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable ## Devise Fields ## Database authenticatable field :email, :type => String, :null => false field :encrypted_password, :type => String, :null => false ## Recoverable field :reset_password_token, :type => String field :reset_password_sent_at, :type => Time ## Rememberable field :remember_created_at, :type => Time ## Trackable field :sign_in_count, :type => Integer field :current_sign_in_at, :type => Time field :last_sign_in_at, :type => Time field :current_sign_in_ip, :type => String field :last_sign_in_ip, :type => String ... end 

我在这里错过了什么吗?

以及此错误与设置与ActionMailer for SMTP配置相关的设置无关。请查看内部并validation配置:smtp用于在development.rbdevise.rb发送邮件(无论您在何处配置)