Fix conflicting variable $message.
Merge branch 'feature/send-error-email-func' into develop