We just put the application into production, and our ISP mail server often returns "451 spool busy" errors when trying to send mail.
Not a single answer was good for us: if we return an error to the user, we pass them a problem with the infrastructure; if we do not, they will not receive their invitation / confirmation / notification / everything, and no one knows why.
Instead, we decided to configure delayed_job and always send mail through it; it starts automatically, and we can see (from the table of the job queue in the database) if messages accumulate. (It was very easy to configure - the hardest part was that the workflow worked, and it was a simple addition to our Monit configuration.)
(Bonus: here is the initializer that I wrote to postpone mail in production, but still send it directly during development and testing: http://gist.github.com/178125 )
source share