add module to send history by email
add email sending function