public int register(string name, string surn, string email, string pwd, string tipo) { int num = new Random().Next(); string encPwd = encriptar(pwd); if (emailMatriculado(email) == 1) { return(2); } db.conectar(); if (!db.register(email, name, surn, encPwd, num, tipo)) { db.desconectar(); return(1); } db.desconectar(); String subject = "Confirmacion de registro"; String body = "<html><body><p> Se ha recibido su solicitud de registro para continuar haga click en el enlace que aparece justo abajo </p><a href = 'https://localhost:44338/Confirmar.aspx?mbr=" + email + "&numconf=" + num + "' > https://localhost:44338/Confirmar.aspx?mbr=" + email + "&numconf=" + num + "</a></body ></html> "; Mail.Mail.send(email, subject, body); return(0); }