Added email notification functionality