random codes and email notifications versione 1