added new function sendmail to get event data and send them to sendmail.php ajax file