> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Put adminsettingset mail transport config

> Set mail transporter



## OpenAPI

````yaml /swagger.json put /admin/setting/set-mail-transport-config
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
paths:
  /admin/setting/set-mail-transport-config:
    put:
      tags:
        - admin
        - setting
      description: Set mail transporter
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  anyOf:
                    - type: string
                      enum:
                        - notifyMailTransportConfig
                    - type: string
                      enum:
                        - automationMailTransportConfig
                transportConfig:
                  type: object
                  properties:
                    senderName:
                      type: string
                    sender:
                      type: string
                    host:
                      type: string
                    port:
                      type: number
                    secure:
                      type: boolean
                    auth:
                      type: object
                      properties:
                        user:
                          type: string
                        pass:
                          type: string
                      required:
                        - user
                        - pass
                  required:
                    - sender
                    - host
                    - port
                    - auth
              required:
                - name
                - transportConfig
      responses:
        '200':
          description: Set mail transporter successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    anyOf:
                      - type: string
                        enum:
                          - notifyMailTransportConfig
                      - type: string
                        enum:
                          - automationMailTransportConfig
                  transportConfig:
                    type: object
                    properties:
                      senderName:
                        type: string
                      sender:
                        type: string
                      host:
                        type: string
                      port:
                        type: number
                      secure:
                        type: boolean
                      auth:
                        type: object
                        properties:
                          user:
                            type: string
                          pass:
                            type: string
                        required:
                          - user
                          - pass
                    required:
                      - sender
                      - host
                      - port
                      - auth
                required:
                  - name
                  - transportConfig
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PUT \
              --url https://app.teable.ai/api/admin/setting/set-mail-transport-config \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"notifyMailTransportConfig","transportConfig":{"senderName":"string","sender":"string","host":"string","port":0,"secure":true,"auth":{"user":"string","pass":"string"}}}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/admin/setting/set-mail-transport-config';

            const options = {
              method: 'PUT',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"name":"notifyMailTransportConfig","transportConfig":{"senderName":"string","sender":"string","host":"string","port":0,"secure":true,"auth":{"user":"string","pass":"string"}}}'
            };


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'PUT',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/setting/set-mail-transport-config',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              name: 'notifyMailTransportConfig',
              transportConfig: {
                senderName: 'string',
                sender: 'string',
                host: 'string',
                port: 0,
                secure: true,
                auth: {user: 'string', pass: 'string'}
              }
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"name\":\"notifyMailTransportConfig\",\"transportConfig\":{\"senderName\":\"string\",\"sender\":\"string\",\"host\":\"string\",\"port\":0,\"secure\":true,\"auth\":{\"user\":\"string\",\"pass\":\"string\"}}}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("PUT", "/api/admin/setting/set-mail-transport-config",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````