---
title: Smtp
description: Resource path:
component: pingam
version: 8.1
page_id: pingam:entity-reference:sec-amster-entity-smtp
canonical_url: https://docs.pingidentity.com/pingam/8.1/entity-reference/sec-amster-entity-smtp.html
section_ids:
  sec-amster-entity-smtp-realm-ops: Realm Operations
  sec-amster-entity-smtp-realm-ops-create: create
  sec-amster-entity-smtp-realm-ops-delete: delete
  sec-amster-entity-smtp-realm-ops-getalltypes: getAllTypes
  sec-amster-entity-smtp-realm-ops-getcreatabletypes: getCreatableTypes
  sec-amster-entity-smtp-realm-ops-nextdescendents: nextdescendents
  sec-amster-entity-smtp-realm-ops-query: query
  sec-amster-entity-smtp-realm-ops-read: read
  sec-amster-entity-smtp-realm-ops-update: update
---

# Smtp

## Realm Operations

Resource path:

```
/realm-config/services/email/smtpTransports
```

Resource version: `0.0`

### create

**Usage**

```
am> create Smtp --realm Realm --id id --body body
```

**Parameters**

* *\--id*

  The unique identifier for the resource.

* *\--body*

  The resource in JSON format, described by the following JSON schema:

  ```json
  {
    "type" : "object",
    "properties" : {
      "port" : {
        "title" : "Mail Server Host Port",
        "description" : "Specifies the port number for the SMTP mail server.",
        "propertyOrder" : 300,
        "required" : true,
        "type" : "integer",
        "exampleValue" : ""
      },
      "username" : {
        "title" : "Mail Server Authentication Username",
        "description" : "Specifies the user name for the SMTP mail server.",
        "propertyOrder" : 400,
        "required" : true,
        "type" : "string",
        "exampleValue" : "username"
      },
      "password" : {
        "title" : "Mail Server Authentication Password",
        "description" : "Specifies the password for the SMTP user name.",
        "propertyOrder" : 500,
        "required" : true,
        "type" : "string",
        "format" : "password",
        "exampleValue" : ""
      },
      "emailImplClassName" : {
        "title" : "Email Message Implementation Class",
        "description" : "Specifies the class that sends email notifications, such as those sent for user registration and forgotten passwords.",
        "propertyOrder" : 100,
        "required" : true,
        "type" : "string",
        "exampleValue" : ""
      },
      "sslState" : {
        "title" : "Mail Server Secure Connection",
        "description" : "Specifies whether to connect to the SMTP mail server using SSL.",
        "propertyOrder" : 600,
        "required" : true,
        "type" : "string",
        "exampleValue" : ""
      },
      "hostname" : {
        "title" : "Mail Server Host Name",
        "description" : "Specifies the fully qualified domain name of the SMTP mail server through which to send email notifications.",
        "propertyOrder" : 200,
        "required" : true,
        "type" : "string",
        "exampleValue" : "smtp.example.com"
      },
      "passwordPurpose" : {
        "title" : "Secret Label Identifier",
        "description" : "AM uses this identifier to create a specific secret label, using the template <code>am.services.email.smtp.{{identifier}}.secret</code> where {{identifier}} is the Secret Label Identifier. <br> The Secret Label identifier can only contain characters {{a-z}} {{A-Z}} {{0-9}} {{.}} and cannot start or end with {{.}}. If this field is populated, the password defined above will be ignored for authentication purposes.",
        "propertyOrder" : 550,
        "required" : false,
        "type" : "string",
        "exampleValue" : ""
      }
    }
  }
  ```

### delete

**Usage**

```
am> delete Smtp --realm Realm --id id
```

**Parameters**

* *\--id*

  The unique identifier for the resource.

### getAllTypes

Obtain the collection of all secondary configuration types related to the resource.

**Usage**

```
am> action Smtp --realm Realm --actionName getAllTypes
```

### getCreatableTypes

Obtain the collection of secondary configuration types that have yet to be added to the resource.

**Usage**

```
am> action Smtp --realm Realm --actionName getCreatableTypes
```

### nextdescendents

Obtain the collection of secondary configuration instances that have been added to the resource.

**Usage**

```
am> action Smtp --realm Realm --actionName nextdescendents
```

### query

Get the full list of instances of this collection. This query only supports `_queryFilter=true` filter.

**Usage**

```
am> query Smtp --realm Realm --filter filter
```

**Parameters**

* *\--filter*

  A CREST formatted query filter, where "true" will query all.

### read

**Usage**

```
am> read Smtp --realm Realm --id id
```

**Parameters**

* *\--id*

  The unique identifier for the resource.

### update

**Usage**

```
am> update Smtp --realm Realm --id id --body body
```

**Parameters**

* *\--id*

  The unique identifier for the resource.

* *\--body*

  The resource in JSON format, described by the following JSON schema:

  ```json
  {
    "type" : "object",
    "properties" : {
      "port" : {
        "title" : "Mail Server Host Port",
        "description" : "Specifies the port number for the SMTP mail server.",
        "propertyOrder" : 300,
        "required" : true,
        "type" : "integer",
        "exampleValue" : ""
      },
      "username" : {
        "title" : "Mail Server Authentication Username",
        "description" : "Specifies the user name for the SMTP mail server.",
        "propertyOrder" : 400,
        "required" : true,
        "type" : "string",
        "exampleValue" : "username"
      },
      "password" : {
        "title" : "Mail Server Authentication Password",
        "description" : "Specifies the password for the SMTP user name.",
        "propertyOrder" : 500,
        "required" : true,
        "type" : "string",
        "format" : "password",
        "exampleValue" : ""
      },
      "emailImplClassName" : {
        "title" : "Email Message Implementation Class",
        "description" : "Specifies the class that sends email notifications, such as those sent for user registration and forgotten passwords.",
        "propertyOrder" : 100,
        "required" : true,
        "type" : "string",
        "exampleValue" : ""
      },
      "sslState" : {
        "title" : "Mail Server Secure Connection",
        "description" : "Specifies whether to connect to the SMTP mail server using SSL.",
        "propertyOrder" : 600,
        "required" : true,
        "type" : "string",
        "exampleValue" : ""
      },
      "hostname" : {
        "title" : "Mail Server Host Name",
        "description" : "Specifies the fully qualified domain name of the SMTP mail server through which to send email notifications.",
        "propertyOrder" : 200,
        "required" : true,
        "type" : "string",
        "exampleValue" : "smtp.example.com"
      },
      "passwordPurpose" : {
        "title" : "Secret Label Identifier",
        "description" : "AM uses this identifier to create a specific secret label, using the template <code>am.services.email.smtp.{{identifier}}.secret</code> where {{identifier}} is the Secret Label Identifier. <br> The Secret Label identifier can only contain characters {{a-z}} {{A-Z}} {{0-9}} {{.}} and cannot start or end with {{.}}. If this field is populated, the password defined above will be ignored for authentication purposes.",
        "propertyOrder" : 550,
        "required" : false,
        "type" : "string",
        "exampleValue" : ""
      }
    }
  }
  ```
