我正在尝试向用户发送确认电子邮件。
但我收到以下错误:
Net::SMTPAuthenticationError(502 5.5.2 错误:命令无法识别
production.rb 中的配置如下:
# Disable delivery errors, bad email addresses will be ignored
config.action_mailer.raise_delivery_errors = true
# set delivery method to :smtp, :sendmail or :test
config.action_mailer.delivery_method = :smtp
# these options are only needed if you choose smtp delivery
config.action_mailer.smtp_settings = {
:address => 'path_to_address_specified_by_my_hoster',
:port => 25,
:domain => 'my_domain.com',
:authentication => :plain,
:user_name => 'signup@my_domain.com',
:password => 'password'
}
我在托管服务提供商的用户配置文件中创建了一个邮箱,名为“signup@my_domain.com”
对于创建的邮箱,他们向我发出了登录名和密码:
登录 = 详细登录
密码 = verbose_password
我没有完全理解 :user_name 的确切格式。
我应该使用
:user_name => "signup@my_domain.com"
或者:
:user_name => "signup"
或者:
:user_name => "verbose_login"
或者这个字段是特定于邮件服务器的,我必须请求托管服务提供商的支持?
:authentication => :plain 和 :login 之间有什么区别?
谢谢。