Sending Electronic Mail From TangoMail ActionThe Mail action sends out electronic mail using the Simple Mail Transport Protocol (SMTP). SMTP is the main protocol used to send mail on the Internet. The Mail action lets you send e-mail messages from Tango application files and Tango class files. For example, you might send an e-mail message to a list of recipients notifying them of a change to a database or that a particular file has been executed. Many types of information gathering are possible. For example, you can use e-mail for inventory management, shipping and receiving, data compilation, generating sales leads, or any function that can use data derived from activity in a database or an object. You can also attach files to an e-mail message generated from Tango, add custom headers, and specify the character set and encoding used for the e-mail message. This chapter covers the following topics: Setting Up a Mail ActionWhen you drag the Mail action into your application file, the Mail action editing window appears. Specify the attributes of your message under the three tabs in the top panel. All of the Mail action fields support the use of Tango meta tags, which are evaluated at the time the e-mail message is sent. General Tab |
|
For more information, see
"mailDefaultFrom". in the Meta Tags and Configuration Variables manual. |
You compose your e-mail message in the bottom pane of the Mail action window. Proper E-Mail Address SyntaxYou must use a valid e-mail address format in the From, To, Cc, and Bcc fields of the Mail action. The following formats are supported by Tango Server:
Options TabClick the Options tab and specify how you want your message to appear to the recipient, as shown in the following fields:
Attachments TabTo attach a file to a message
For each path field, meta tags can be inserted to a maximum length of 1024 characters. Tango evaluates meta tags in the file path for each attachment in the list. After meta tag substitution, Tango determines whether the value is text or an array. If the value is an array, Tango processes every cell in the array as a separate file path. For example, you could enter the following in a field in the Attached Files section of the Mail action dialog box: When the application file is executed, the file or files specified by the variable myFiles (single value or array) are attached to the generated e-mail message. When the Mail action is executed, Tango Server connects to the SMTP server. Tango then sends the message to all the specified recipients. |
For
more information, see mailPort in the
Meta Tags and Configuration
Variables manual. |
The SMTP server is defined by the configuration variables mailServer and mailPort. These variables can be changed using the config.taf application file. They are stored in the Tango Server configuration file (Tango 2000 Server Preferences). The result of the action is a one-column array of the messages sent to and received from the SMTP server. Use <@COL 1> inside a <@ROWS> block in the Mail action's Results HTML to display these results. This information can be useful for debugging a Mail action. The resultSet for a Mail action shows both the mail server's and the client's side of the SMTP conversation, and the commands Tango sends to the mail server. Disabling Mail |
You can specify that mail attachments can only come from a specified directory of Tango Server using the absolutePathPrefix configuration variable. Using this configuration variable to set the path for mail attachments ensures that users cannot access directories other than the specified ones when using the Mail action. This configuration variable also affects all other actions which have absolute paths as parameters. |
|
Mail actions are enabled in Tango by default. If you want to disable (or enable) this feature, you can do so by changing the following option in the config.taf application file Feature Switches screen: |
Copyright © 1999, Pervasive Software. All rights reserved.