Configure SMTP settings

Set up the SMTP server and authentication mode UserLock uses to send email notifications, including OAuth 2.0 for Microsoft 365 and Google.

Published December 31, 2026

Before you begin

This guide covers two distinct paths, depending on what your SMTP server requires:

Path

When to use it

Section to follow

Standard authentication

Your SMTP server accepts anonymous connections, Windows authentication, or a username and password (internal relay, hosted mail server)

OAuth 2.0

You send email through Microsoft 365 or Google, which have phased out basic authentication. UserLock supports OAuth 2.0 with these two providers only.

Identify your path first, then make sure you have:

  • Access to the UserLock console with permission to modify Server settings. For OAuth 2.0, use the console installed on the UserLock server.

  • Your SMTP server details: address, port, and the authentication method it accepts.

  • A sender email address allowed to send through this SMTP server, ideally a dedicated mailbox such as userlock-noreply@yourdomain.com.

Configure SMTP with standard authentication

Use this path for any SMTP server that does not require OAuth 2.0: an internal relay, a hosted mail server, or a provider that still accepts basic authentication.

  1. In the UserLock console, go to Server settings ▸ Email settings.

  2. In Server, enter the IP address or hostname of your SMTP server.

  3. In Port, enter the port your server uses: 25 (default, unencrypted), 465 (implicit SSL) or 587 (modern submission port).

  4. In From, enter the address that will appear as the sender of notifications.

  5. Enable SSL encryption if your server requires an encrypted connection.

  6. In Authentication, select the method your server accepts:

    • No authentication: the server accepts anonymous connections, typically an internal relay restricted by IP address.

    • Windows authentication: UserLock connects with the service impersonation account Reference.

    • Provide credentials: enter a dedicated User name and Password for the SMTP connection.

  7. Save the settings, then send a test email (see below).

Configure SMTP with OAuth2

Use this path if you send email through Microsoft 365 or Google. These are the only providers supported by Modern authentication (OAuth 2.0). With any other provider, use standard authentication or an internal relay.

  1. Register an application with your provider:

  2. Open the UserLock console on the UserLock server and go to Server settings ▸ Email settings. The OAuth 2.0 option is disabled in the Web console.

  3. In Server, enter smtp.office365.com for Microsoft 365 or smtp.gmail.com for Google. Enter it first: the credential fields shown later depend on this address.

  4. In Port, enter 587.

  5. In From, enter the mailbox that will sign in to the provider.

  6. Enable SSL encryption.

  7. In Authentication, select Modern authentication (OAuth 2.0).

  8. In Client ID, enter your application's client ID. Then, for Microsoft 365, enter the tenant ID in Tenant ID; for Google, enter the client secret in Secret.

  9. Click Sign in, sign in with the same account as in From, and consent to the requested permissions.

  10. Check that the sign-in succeeded, save the settings, then send a test email (see below).

Send a test email

  1. Under Test the configuration, enter a valid recipient address.

  2. Click Send test email. The result is displayed in a notification in the bottom-right corner.

  3. Check the recipient's inbox.

Troubleshooting

  • Authentication fails: check that the authentication method matches what your server accepts. Microsoft 365 and Google reject basic authentication on most tenants; use Modern authentication (OAuth 2.0).

  • Connection fails or times out: verify that the port is open between the UserLock server and the SMTP server. Some networks block outbound port 25.

  • The OAuth 2.0 option is disabled: you are using the Web console. Configure OAuth 2.0 from the UserLock console on the server.

  • Test email rejected after an OAuth 2.0 sign-in: make sure you signed in with the same account as in From, then sign in again.