added some logging to test out the sending of emails