【发布时间】:2014-07-21 13:55:58
【问题描述】:
在我的项目中,我使用的是 Rails 4.1.1 和 Ruby 2.1.1。我正在阅读 mail gem,但不确定如何检查 deliver 是否失败(出于任何原因)。
result = UserMailer.signup.deliver
if result.action == 'failed' or result.bounced?
# How can you tell if a deliver has failed?
# Do stuff here if failed
end
【问题讨论】:
标签: ruby-on-rails ruby actionmailer