I've set up my SAAS app with Devise Invitable, which allows a user to create other users by "inviting" them to join the website. An email is sent to invite them.
My problem is that if the email address doesn't exist I get a nice
Net::SMTPFatalError (550 5.1.2 <firstname.lastname@example.org>: Recipient address rejected: Domain not found.
Is there any way to rescue this without having to fork the gem, and with some clean code ? All I want is to add a notice saying the email couldn't be sent, but the user still has to be created.
Does it throw in your controller code? You can
Net::SMTPFatalError error, and tell the user that there was a problem with the email (here clearly the domain does not exist so the error message is clear and right)