fix sending/printing of emails depending on config setting