How to set up two factor with Email OTP

It is required that Email claim type and Email server are configured correctly.
Email claim type in System Setup
OTPEmail2

OTP Connection settings

Order of factors: set value to Email. You can also add more methods (Sms or Authenticator - separated by comma) to let OTP fallback to them if error happens with the Email method.
Email claim type: set value to the claim type which contains user's email address.
One Time Password length, One Time Password lifetime, Max input attempts: set values base on your security requirement.
OTPEmail3

Email template

Email template that is used to send OTP code is named SendOtpCodeTemplate. You can customize it to modify the message sent to user's email address. The template currently supports the otpCode merge field.
The <%=otpCode%> text in template will be replaced by the OTP code generated by the OTP plugin.
OTPEmail4
Once that is done, you can assign the OTP connection to act as second factor of an authentication connection. See this article for more instruction.