def get_email_address(whoami="user"):
    """ Auto-generate the FROM and TO email address """
    if whoami == "user":
        username = getusername()
        domain = getdomainname()

        myemail = "{0}@{1}".format(username, domain)
        return myemail
    else:
        fromaddr = "notifier-donotreply@{0}".format(getdomainname())
        return fromaddr
Auto-generate the FROM and TO email address