added email send functionality