Maintenance utilities > System maintenance
tc_mail_smtp
Sends SMTP (Simple Mail Transfer Protocol) e-mail. Use this platform-independent utility when sending e-mail on both Linux and Windows platforms. E-mail server settings are specified using Teamcenter Environment Manager during Teamcenter installation as described in Advanced Foundation settings in the Teamcenter Environment Manager help. Caution The only authentication for this tool is performed by the operating system. Therefore, you must take precautions to ensure that the utility is not misused. Use this utility at your own risk. Syntax tc_mail_smtp {-to=address | -to_list_file=email-list-file-name} [-cc=address] [-bcc=address] [-subject=subject-line] [-server=mail-server-name [:port]] [-port=port-num] [-body=file-name[-body=alternate-file-name]] [-attachments=file-name] [-user=sender's-name] [-name=display-name] [-charset=character-set] [-validation=validation-mode] [-testmode=file-name] [-priority={1 | 2 | 3}] [-auth={true | false}] [-authId=authenticating-ID] [-pf=qualified-file-name] [-conSecurity={None | SSL/TLS | STARTTLS}] [-ssltlsProtocol={TLSv1 | TLSv1_1 | TLSv1_2 | TLSv2 | TLSv23 | TLSv3}] [-isOauth={true | false}] [-clientId=client ID] [-tenantId=tenant ID] [-oauthScope=scope of permissions] [-sslVerify={true | false}] [-h] Arguments -to Specifies the e-mail address of the recipient. If there are multiple recipients, use a -to argument for each recipient. Either this argument or the -to_list_file argument is required. -to_list_file Specifies the full path and file name of the file containing the list of e-mail addresses. Each line of the file must contain a full e-mail address. Either this argument or the -to argument is required. -cc Specifies the e-mail address of the carbon-copied recipient. If there are multiple recipients, use a -cc argument for each recipient. -bcc Specifies the e-mail address of the blind carbon-copied recipient. If there are multiple recipients, use a -bcc argument for each recipient. -subject Specifies the subject line of the e-mail. Accepts a string up to 100 characters. Enclose the string text in double quotes. -server Specifies the name of the mail server. Accepts a string up to 100 characters. Optionally, you can define the mail server port within this argument. For example: Copy -server=myserver:1234 Alternatively, you can define the mail server port using the -port argument. If you do not use either method to specify the mail server port, the SMTP mail port (25) of the local machine is used. -port Specifies the mail server port. If not defined, the SMTP mail port (25) of the local machine is used. -body Specifies the full path (limited to 200 characters) to the file containing the text of the e-mail body. Limited to 200 characters. You can also specify an alternate file name, in a different format. Files can be either text files or HTML files. (HTML files extensions can be only .htm or .HTM.) For example: Copy -body=C:\mail\body\filename1.txt -body=C:\mail\body\filename2.htm You can use this argument to specify a total of one text file, or one HTML file, or one text file and one HTML file. You cannot specify, two or more text files, or two or more HTML files. If you specify one text file and one HTML file, the e-mail always contains the text message first, and then the HTML message, regardless of the order in which you sent the argument values. If you specify multiple values for the same body type, the last value entered in the command line for this argument is read by the system. For example, if you specify: Copy -body=C:\mail\body\filename1.txt -body=C:\mail\body\filename2.txt -body=C:\mail\body\filename3.txt Only the contents of filename3.txt are added to the body of the message. -attachments Specifies the full path and file name of one or more attachment lists and the format of each attachment (B=binary text, T=text). The full path and file name cannot exceed 200 characters. For example, you can specify the full path of the location of the bin_file file and indicate the file is a binary file: Copy C:\mail\attachments\attachment1\bin_file=B To include graphics within the HTML body of an e-mail, specify the image source within the HTML (img src=cid:myimage.jpg), and then specify the same image source within the attachment file. For example: Copy C:\mail\attachments\attachment1\myimage.jpg=B To include several graphic attachments with the same name, differentiate the files with IDs. In the HTML body of an e-mail, specify the various image sources within the HTML (img src=cid:fred_image.jpg) and (img src=cid:bob_image.jpg). Then specify the corresponding image sources within the attachment file. For example: Copy C:\mail\attachments\attachment1\myimage.jpg=B,html,id=fred_image.jpg C:\mail\attachments\attachment2\myimage.jpg=B,html,id=bob_image.jpg -user Specifies the name of the user from whom the e-mail is sent. If not defined, the login name of the local machine is used. -name Specifies the name as presented to the recipient. -charset Specifies the character set of the message body. Possible values are defined by the Internet Assigned Numbers Authority (IANA). -validation Determines the behavior of e-mail delivery if an invalid e-mail address is entered. 0 E-mail delivery continues, even if incorrect e-mail addresses are encountered. No error is returned. This is the default setting. 1 E-mail delivery continues, even if incorrect e-mail addresses are encountered. An error is returned. 2 E-mail delivery is sent first to recipients on the To list, then the CC list, and then the BCC list. Delivery stops at the first invalid address. An error is returned. -testmode Allows you to print a test of the e-mail output. Specify either stderr, stdout, or the full path and file name to the stderr file. -priority Specifies the priority of the e-mail. 1 The e-mail is sent with high priority and high importance. 2 The e-mail is sent with normal priority. 3 The e-mail is sent with low priority and low importance. -auth Specifies whether authentication is used when Teamcenter connected to a mail server. false (The default value.) E-mail sent from Teamcenter is not authenticated. true E-mail sent from Teamcenter is authenticated using the values specified with -authId and -pf. -authId Specifies the e-mail ID or the user ID to use for e-mail authentication. Chose an e-mail ID (such as teamcenter@yourdomain.com) or user ID (such as tcserver01) based on your e-mail server requirements. -authId is used when -auth is set to true. pf Specifies the full path and file name of the encrypted password to use for e-mail authentication. For example, Copy "C:\Teamcenter\TcSecurity\email_password" -pf is used when -auth is set to true. The encrypted password file is created using Teamcenter Environment Manager. See Configuring Teamcenter mail for instructions on creating a new password. -connSecurity Specifies the type of secure connection to establish when connecting to the mail server. None (The default value.) No security connection protocol is used when connecting with the mail server. SSL/TLS Establish an SSL/TLS connection when connecting to the mail server. STARTTLS Establish an initial insecure connection and later convert to a TLS connection with the mail server. -ssltlsProtocol Specifies the protocol and version to use when connecting with the mail server. TLSv1 (The default value.) Transport Layer Security version 1. TLSv1_1 Transport Layer Security version 1.1. TLSv1_2 Transport Layer Security version 1.2. SSLv2 Secure Sockets Layer version 2. SSLv23 Secure Sockets Layer version 2.3. SSLv3 Secure Sockets Layer version 3. -isOauth Specifies whether Oauthentication is used. This is supported only for mail sent from a Microsoft mail server. false Email sent from Teamcenter is not authenticated with Oauth2 protocol. true Email sent from Teamcenter is authenticated using the values specified with Oauth2 protocol. -clientId Specifies the client ID of the application registered in Microsoft Entra. This is applicable when isOauth = true. -tenantId Specifies the tenant ID of the application registered in Microsoft Entra. This is applicable when isOauth = true. -oauthScope Specifies the scope of permissions that the application requests to access a user's data in Microsoft Entra. This is applicable when isOauth = true. https://graph.microsoft.com/.default This is the default value. https://outlook.office.com/SMTP.Send offline_access This is the alternative value. -sslVerify Specifies whether SSL verification is used. This is supported only for mail sent from a Microsoft mail server. false SSL verification is disabled for posting CURL requests. true SSL verification is enabled for posting CURL requests. -h Displays help for this utility. Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in Log files produced by Teamcenter. Restrictions None. Examples When defining the formatting of the attachment list, each line in the list must consist of an attachment file name and its file format. Assume that the attachment list file is called attachment_list.txt, and the list's content is: Copy C:\temp\BAR_RED.JPG=B C:\temp\test.txt=T This results in two files being included as attachments, one binary file named BAR_RED.JPG and one text file named test.txt. Both files are located in the C:\temp\ directory. Copy tc_mail_smtp -subject="my test" -to=person1@company1.com -to=person2@company2.com -cc=person3@company3.com -bcc=person4@company4.com -server=mail_server_1 -body=C:\temp\test.txt -attachments=C:\temp\attachment_list.txt -user=person5 Connect with an email server requiring authentication. Copy tc_mail_smtp -subject="Secure Example" -to=person1@company1.com -server=secure_mail_server:25 -auth=true -authId=email-name -pf="C:\Tc\TcSecurity\passwd.pf" -connSecurity=SSL/TLS Copy -ssltlsProtocol=SSLv23 -body=C:\email\body.txt -charset="ISO-8859-1"
Source: https://docs.sw.siemens.com/documentation/external/PL20251212545240207/en-US/tc_help/utilities_reference/mna1737253705286/xln1737253708250/tc_mail_smtp.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)