modification of the function get_attacks() and send all information via email