You can download this code by clicking the button below.
This code is now available for download.
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