added more logging for mail sending