def __init__(self, user_db, passwd_db, smtp_server, outgoing_sender,
                 template_env, code_ttl=2, template="mail_two_factor.jinja2",
                 **kwargs):
        super(MailTwoFactor, self).__init__(None)
        self.template_env = template_env
        self.template = template

        self.first_factor = UserPass(passwd_db, template_env)
        self.first_factor.url_endpoint = self.url_endpoint

        cls = make_cls_from_name(user_db["class"])
        self.user_db = cls(**user_db["kwargs"])
        self.smtp_server = smtp_server
        self.outgoing_sender = outgoing_sender
        self.code_ttl = code_ttl * 60 * 1000  # ttl in ms

        self.codes = {}
:param user_db:
dataset/ETHPy150Open ga4gh/server/oidc-provider/simple_op/src/provider/authn/two_factor.py/MailTwoFactor.__init__