Sending mail implementation