[TOC] [Prev] [Next] [Bottom]



Chapter Sixteen

Sending Electronic Mail From Tango


Mail Action

The 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 build features into Tango application files so you can send e-mail messages. For example, you might send a 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 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.

In fact, you can send a mail message about any subject to anyone with an e-mail address. You simply add the Mail action to an application file, prepare your message, and execute the file to send the message.

This chapter covers the following topics:

  • setting up a Mail action
  • getting additional functionality from Tango mail.

[top] [back to top]


Setting Up a Mail Action

When you drag the Mail action into your application file, the Mail action editing window appears.

Enter your information in the six mail fields as follows:

For more information, see "mailDefaultFrom" in the Meta Tags and Configuration Variables manual.

For more information, see "Configuring Tango Server".

  • From. Type the Internet mail address of the person who the mail message is from. Normally, this is also the address that replies and error messages go to.

    If this field is left empty, Tango uses the system configuration variable mailDefaultFrom to determine the default value.

    The value of this variable can be changed in the config.taf application file. You would enter the address of the person sending the mail message, for example, tango@pervasive.com. This variable is also stored in the Tango Server configuration file (t3server.ini) as MAILDEFAULTFROM.


    !Note: If both the configuration variable and the From field are empty, then the mail message cannot be sent. A mail message must always be from somebody.


  • To. Type an Internet mail address or a comma-delimited list of addresses.
  • Cc (carbon copy). Type the Internet address of the person you want to send a copy of the message to. This field also allows you to enter a comma-delimited list of addresses.
  • Bcc (blind carbon copy). This field is the same as Cc except the recipients are not listed in the message; that is, the To, Cc and other Bcc recipients will not know that the message also went to those addresses.
  • Subject. Type the subject of the mail message.
  • Message. Type your message.

All of the mail fields support the use of Tango meta tags, which are evaluated at the time mail is sent.

When the Mail action is executed, Tango Server connects to the SMTP server. Tango then sends the message to all the specified recipients.

The SMTP server is defined by the configuration variables mailServer and mailPort. These variables can be changed by using the config.taf application file. They are also stored in the Tango Server configuration file (t3server.ini) as MAILSERVER and MAILPORT.

The result of the action is a one-column array of the messages received from the SMTP server. Use <@COL 1> inside a <@ROWS> block in the Mail action's Results HTML to display these results.

The result array is also stored automatically in the local variable resultSet.

[top] [back to top]


Disabling Mail

For more information, see "Configuring Tango Server".

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:

mailSwitch

Check or uncheck the check box beside the option.

[top] [back to top]


Getting Additional Mail Functionality

Earlier versions of Tango did not have a mail action built in. Windows Tango users sent out mail by calling an External action. This was called TeMail.

TeMail is still available in Tango, and it has a few functions not yet built into the Mail action, such as MIME (Multipurpose Internet Mail Extensions) encoding, and the ability to send mail with HTML formatting.

TeMail is not included in the installer, but it is included on the Tango CD-ROM.

TeMail documentation is only available in electronic form in the Windows Help file installed with TeMail.



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1998, Pervasive Software Inc. All rights reserved.