data delete logic and Email logic