# Error SMTP configuration and problem with two-factor authentication

**URL:** <https://forums.rocket.chat/t/error-smtp-configuration-and-problem-with-two-factor-authentication/16062>\
**Category:** Community Support\
**Created:** [February 24, 2023, 5:06am UTC](https://forums.rocket.chat/t/error-smtp-configuration-and-problem-with-two-factor-authentication/16062 "2023-02-24T05:06:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaro](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jaro](https://forums.rocket.chat/u/jaro)\
**Post date:** [February 24, 2023, 5:06am UTC](https://forums.rocket.chat/t/error-smtp-configuration-and-problem-with-two-factor-authentication/16062/1 "2023-02-24T05:06:49Z")

</div>

### Description

Hello

I was setting up a new smtp provider and failed in the configuration.

Now to modify the configuration I am asked for two-factor authentication by email.

But I can’t receive the code.

What can I do?

Thanks

### Server Setup Information

- Version of Rocket.Chat Server: 5.1.2
- Operating System: Debian
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
- Proxy:
- Firewalls involved:

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [February 24, 2023, 1:58pm UTC](https://forums.rocket.chat/t/error-smtp-configuration-and-problem-with-two-factor-authentication/16062/2 "2023-02-24T13:58:10Z")

</div>

Hi! Welcome to our community 🤗

You can disable the two factor authentication if you have access to the admin page.

if you don’t have access, but still have access to the server, you can disable it by passing an environment variable, like such:  
OVERWRITE\_SETTING\_Accounts\_TwoFactorAuthentication\_Enabled: false

Let me know if this helps or you need further assistance.
