ActionMailer::Base.delivery_method = :smtp
#ActionMailer::Base.default_charset = "utf-8"
ActionMailer::Base.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:address => "smtp.exmail.qq.com",
:port => "25",
:domain => "qq.com",
:authentication => "login",
:user_name => "somename",
:password => "somepass",
}
这样可以么?
我测试了,似乎没反应。
ActionMailer::Base.smtp_settings = {
:address => "smtp.qq.com", # default: localhost
:port => '25', # default: 25
:user_name => AppConfig.smtp_user,
:password => AppConfig.smtp_pass,
:authentication => :plain # :plain, :login or :cram_md5
}
测试正常
ActionMailer::Base.smtp_settings = {
:address => "smtp.qq.com",
:port => 25,
:domain => "qq.com",
:user_name => "username",
:password => "password",
:authentication => "plain"
}
QQ 的这么试无误,关键是不能要
:enable_starttls_auto => true
这句,true false 都不要,根本不要这句……
可是 263 的还是不成…………
#5 楼 @sandybeauty 兄弟,可以贴出你的 gmail 的配置么?是配置在 config/application.rb 文件中么?我的是放在这个文件中,console 可以打印出 mail 内容,但是就是收不到邮件呢