Added logging for emails