add email logging for testing