adding sending mail function