Fix logging and the SMTPHandler
With this, we now have the SMTPHandler handler properly configured and
running. It sends email on exception both for the flask application as
well as for the different workers.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>