implemented timeout for the send mail operation