---
schema_version: "1"
id: 0b8c98617250375d2e8fd00342cb098ce700092860820c80b549d360965562c2
title: tsm email
collection: tableau
version: next
locale: zh-cn
portal_url: https://docs.salesforce.com/tableau/next/zh-cn/server/cli_email.md
canonical_url: https://help.tableau.com/v0.0/server/zh-cn/cli_email.htm
source_site: help.tableau.com
content_type: documentation
content_hash: c7948b20af34149c238de6117078b62869cfdbaeb77a139f8d3945dacf82ac11
description: Reference for the tsm email command to view and test the Tableau Server SMTP configuration.
---
[跳转到主要内容](#main-content)

# tsm email

使用 `tsm email` 命令来查看和测试 SMTP 配置。

有关配置 SMTP 的详细信息，请参见[配置 SMTP 设置](https://help.tableau.com/v0.0/server/zh-cn/config_smtp.htm)。

## tsm email test-smtp-connection

运行此命令以测试 STMP 连接。运行时，TSM 将尝试与已为 Tableau Server 配置的 SMTP 服务器建立连接。TSM 还将返回连接状态以及 SMTP 配置的详细信息。

在某些情况下，该命令将返回误报状态。举例来说，如果 Postfix SMTP 服务器设置为需要 TLS，但没有针对为 TLS 配置 Tableau Server，则会建立连接，并且 TSM 将报告成功连接。但是，在这种情况下，Postfix 实际上会在 TSM 连接后拒绝电子邮件。

### 概要

`tsm email test-smtp-connection [global options]`

## 全局选项

\-h, --help

可选。

显示命令帮助。

\-p, --password <password>

在会话不是活动状态的情况下为必需，`-u` 或 `--username` 也为必需。

为在 `-u` 或 `--username` 中指定的用户指定密码。

如果密码包括空格或特殊字符，请将其括在引号中：

`--password "my password"`

\-s, --server https://<hostname>:8850

可选。

对 Tableau 服务管理器使用指定的地址。URL 必须以 `https` 开头，包括端口 8850，并使用服务器名称（而不是 IP 地址）。例如，`https://<tsm_hostname>:8850`。如果没有指定服务器，则假定为 `https://<localhost | dnsname>:8850`。

\--trust-admin-controller-cert

可选。

使用此标志来信任 TSM 控制器上的自签名证书。有关证书信任和 CLI 连接的详细信息，请参见 [连接 TSM 客户端](https://help.tableau.com/v0.0/server/zh-cn/tsm_overview.htm#Connecti)。

\-u, --username <user>

在会话不是活动状态的情况下为必需，`-p` 或 `--password` 也为必需。

指定用户帐户。如果未包括此选项，则使用您登录所使用的凭据运行该命令。