In my project, I'm using Rails 4.1.1 and Ruby 2.1.1. I was reading the mail
gem, but wasn't sure how to check if the deliver
failed (for any reason).
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