Fix a couple of bugs in email configuration handling.