send the mails using mail function