You can download this code by clicking the button below.
This code is now available for download.
This function generates a random email address using the `username` and `domain` parameters. It utilizes the `Internet` module from the Mimesis library to obtain random email suffixes.
Technology Stack : Mimesis, Python
Code Type : Function
Code Difficulty : Intermediate
def generate_random_email(username, domain):
import random
from mimesis import Internet
email = f"{username}.{random.choice(Internet.email_suffix())}@{domain}"
return email