put the email hash timeout in a constant
simplify by using `getattr()` instead of `hasattr()`
fix indentation