Random Email Generator Using Mimesis

  • Share this:

Code introduction


This function takes two arguments, one for generating the username of an email address and another for the domain. It uses the `internet` sublibrary of the Mimesis library to generate a random email address.


Technology Stack : Mimesis

Code Type : Function

Code Difficulty : Intermediate


                
                    
def generate_random_email(user, domain):
    import mimesis
    email = f"{user}@{mimesis.internet.email(domain=domain)}"
    return email                
              
Tags: