Adding logging message when sending emails fail