0
Generate a random email
I need to generate a random email, for when I will create the registration of a user on my system, every time I insert a new user I need to generate this email.
Below the code snippet where I will launch the generated random email.
formGroup.email = "emailrandômicoaqui",
It needs to be like this: [email protected]
Because it was a business rule that we created, that the user’s email will be set in another form from another part, by the administrator, so at the time of registration, we do not let an email be repeated and we do not let it go empty. That’s why I need to generate e-mail.
Does mail have a domain? or is it basically an Random string and only one that you look for?
– Sergio
And there’s no rule to generate that? It just has to be Random? Email can be something like
[email protected]
?– Jéf Bueno
Yes friends, it can be anything random in the style [email protected], I really appreciate the help. @Sergio
– Philip Developer
@jbueno has rule yes, it has to be in the valid pattern, because the loopback does not let pass in invalid format.
– Philip Developer
Then just generate a guid/uuid. Here’s how to create this in Javascript in this question
– Jéf Bueno
@jbueno thanks, I think this will serve, I will give a debug in the code and test here
– Philip Developer