When you set up two-factor authentication with the email verification option, you may see Failed to send setup email, and no code arrives.
Why this happens. The email-code option depends on your website being able to send outgoing mail. When the site cannot send mail, the code is never generated or delivered.
What you can do.
- Check your spam or junk folder, and confirm the email address shown is correct.
- Check whether other emails from the site, such as contact form messages or password resets, are also failing to arrive.
- If all site email is failing, this points to an outgoing mail configuration issue on the server side, which you cannot fix from WordPress admin. Contact support for assistance.
Alternatives. You can switch to the authenticator app method (Google Authenticator, Authy), which does not depend on email. On preview sites, support may temporarily disable two-factor while the mail issue is resolved.