---
title: Configuring the SMTP server
description: Configure the SMTP external server in the PingDirectory server through dsconfig, with host name, port, and authentication settings.
component: pingdirectory
version: 10.2
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_config_smtp_server
canonical_url: https://docs.pingidentity.com/pingdirectory/11.1/pingdirectory_server_administration_guide/pd_ds_config_smtp_server.html
llms_txt: https://docs.pingidentity.com/pingdirectory/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2023-09-13T00:00:00Z
superseded_by: https://docs.pingidentity.com/pingdirectory/11.1/pingdirectory_server_administration_guide/pd_ds_config_smtp_server.html
section_ids:
  steps: Steps
  example: Example:
  example-2: Example:
---

# Configuring the SMTP server

## Steps

1. To configure a simple mail server, use the `dsconfig` command.

   ### Example:

   ```shell
   $ bin/dsconfig create-external-server --server-name smtp1 \
     --type smtp --set server-host-name:smtp.example.com
   ```

2. To configure an SMTP server, use the `dsconfig` command.

   ### Example:

   ```shell
   $ bin/dsconfig set-global-configuration-prop \
     --set smtp-server:smtp1
   ```

   This command adds the server to the global list of mail servers that the PingDirectory server can use.
