Adding the debug logging of emails sent out.