Handle when the params hash is unavailable in a mailer

This was an issue previously fixed in Rails under this commit: https://github.com/rails/rails/commit/dbca49b, but seems to have regressed here as it is occurring for me in production only, and this patch fixes this issue.