TEA logo

Turbo Email Answer :: Documentation

Contents

  1. Introduction
  2. Installation & Quickstart Tutorial
  3. User Interface
  4. Keyboard Acceleration
  5. Email I/O Accounts Dialog
  6. Auto-Responder Setup Dialog
  7. General Settings Dialog
  8. Mail Transfer Settings
  9. Backup & Auto Save Configuration
  10. Menu/Config/Set Application Database Location
  11. Common Base Macros
  12. Internal Mail Editor
  13. Template Editor Dialog
  14. TEA Macro Programming / API
  15. HOW-TO
  16. FAQ & Trouble Shooting

Quick Links

Introduction

Welcome to TurboEmailAnswer - an email super-client software featuring the following functions:

  • Interactive template-based email answering & forwarding
  • Automatic email auto-responding
  • Windows-wide hotkey access to text snippets
  • Email super-client integrating multiple inbox and mail systems.
    ( for MS Outlook, Outlook Express, Eudora, Netscape, POP/SMTP/IMAP ... )

Main Features:

  • Keyboard triggered answer & forward templates
    Answer templates can by triggered quickly simply by typing the beginning letters of template's key-names while you are in the inbox or in the email pre-viewer. E.g.: you have the cursor in the inbox list on a mail | You see its a certain question regarding your ebay product | Type the beginning letters of a template name like "eb" for "ebike" and the prepared answer is presented in your email editor. After editing and sending the answer you can simple confirm to shift the original email to a certain folder
  • Automatic text pre-classification to "best" template
    Mails can be pre-classified to a "best" template by matching the text-body/subject/From/To-Address against word patterns or even by analyzing the text with more complex macros.
  • Full-automatic autoresponder (with simulation mode)
    Any answer templates can be set up for auto-response.  E.g. incoming mails with certain word patterns in Subject/From:/TextBody trigger the best matching template for a full-automatic (computed) responses
  • 1-click template-to-clipboard-copy
    In TEA simply make a single mouse click on a template (in the list) --> the template text body (snippet) is in the windows clipboard
  • Global Windows hotkey for template-to-clipboard-copy
    Press e.g. Ctrl-F9 while working in any application like Winword.  A small selection drop-down appears:  type beginning letters of template name.  The template text body goes as text snippet to  the Windows clipboard.  Paste it in your document with Ctrl-V
  • Template driven shift to archive folders
    Each answer template can define a target folder: Answered or non-answered emails are archived to the target folder (confirm option)
  • Template grouping & keyboard triggers
    A shot key sequence like     e SPACE p       triggers a template with short name "ebay/payment".  The slash in keynames enables to sub-access whole folders of templates
  • Answer templates support smart text-variables  
    Template text bodies and subjects can contain variables like %FromName% to insert data of the original mail or even macro computed values. (e.g. taken from a database). Attachments can be added by a flexible macro function 
  • Recursive template inclusion (e.g. for smart signatures and ads)
    Answer templates can include text of other templates. Thus you can maintain variable signatures, sub-templates, changing advertisements at the bottom, etc. )
  • Answer & Forward processing 
  • Mass handling of multiple selected mails with the same template
  • Mass handling of pre-classified mails
    Trigger pre-classified templates py pressing 2 x SPACE key on selected mails
  • Supported Email IO / Super-Inbox for:
    • MS Outlook: Extended integration incl. shifting answered mails to Outlook's own folder tree, using Outlooks normal mail editor etc.
    • MS Outlook Express: incl. using OE's normal mail editor. 
      ( Shifting to OE's folder tree available soon: OE Extended Integration )
    • Eudora, Mozilla, Netscape (MAPI interface)
    • Any other MAPI enabled email client software
    • Standalone POP/SMTP client is built-in
    • Standalone IMAP/SMTP client is built-in
  • Handles Text & HTML mails
  • Macro computed answers
    Macro computing of answers is another option in addition to fixed templates and simple variable personalization
  • Advanced macro automation
    Incl. interface options to files, ODBC, importing Python modules, etc.
  • User defined GUI input form dialogs 
    Answer macros can use additional user input from GUI form; Thus you can e.g. include product data, IDs for querying databases quickly etc. in your mails
  • Well designed for minimum user interaction
    TEA is well thought out to minimize the amount of key-pressing, clicks, etc.
  • Internal backup and auto-save system 
    Auto-cycling backup of your valuable templates and the email archive database. Backup can e.g. rotate on 10 archive versions.
  • Lots of extra ideas and tricks to improve efficiency

General Description of Operation:

The graphical user interface is built up of the following main parts:

  • Internal Mail Folder Tree : The mail repository, which is drag-drop sensitive. Most important folder is the super-inbox (red) which displays the incoming messages of all synchronized Email IO accounts ( MS Outlook, Outlook Express, Eudora, Netscape, Mozilla, MAPI-compliant clients, POP/IMAP/SMTP accounts ).
    The Out-folder, Draft-folder and Sent-folder are especially important when TEA works a standalone POP/IMAP/SMTP client. 
    Note: MS Outlook is supported in an advanced mode: Answered mails can also be shifted to the Outlook's own folder tree instead of TEA's internal tree. The mode can be selected in Outlook account settings). 
  • Display List for Inbox & Current-Selected-Folder: Show the emails in the folder. Colors and bold high-lighting for new and classified mails
  • Mail Previewer below Mail List Display: Can display Text and HTML mail. Note: You can force displaying in text-only mode in Menu/Config/Settings
  • Template List : List of  temlates (answer/forward/text-snippet) with Short-Key-Name, Full-Name. Color high-lighting for macro-powered templates.

The core engine features the following main functional components:

  • Internal mail folder repository
  • Support for multiple parallel Email-IO accounts: Thus you can super-control all you email inboxes and other email clients with this single super-client software
  • Autoresponder: The auto-response processor: works in combination with template's normal mail classification system (classification word patterns and macros)
  • Standalone POP/IMAP & SMTP email client
  • MS Outlook advanced synchronizer
  • MAPI synchronizer ( for Eudora, Netscape, Mozilla and any MAPI enabled email client software)
  • MS Outlook Express synchronizer ( OE Extended Integration )
  • Text & HTML pre-viewer
  • Text & HTML mail editor, external HTML editor interface
  • Embedded Python macro language interpreter: Supports mail classifiction and answer macros. 3 base macros (Application-Startup, Common-Answer-Macro, Common-Classification-Macro) can be set up in Menu/Config/Common Base Macros
  • Mail template processor understanding variables and short macro-expressions.
  • Smart Keyboard auto-sense function for triggering answer templates efficiently: Simply type the beginning letters of template's keynames - and optionally use the cursor inside the auto-completion drop-down-list
  • Windows global hot-key function to enabling quick access to TEA's template text snippets
  • Autosave &  Backup System: Multiple cycling backup is supported in order to protect you valuable template and email data.

Installation & Quickstart Tutorial

Installation

  • Run the installer (Download). The installer for trial and full versions of TEA is always the same. A trial version can be converted to a full version by entering a registration key for TEA. 
  • Run TEA from the Windows start menu; Optionally "copy-drag" the start icon to the Windows desktop (Ctrl key down + drag-drop the HarvEX launch icon to desktop)
  • Setup automatic TEA startup after starting Windows: Copy-drag the TEA icon from Window start menu to the "Autostart" folder of the Windows start menu (Ctrl key down + drag-drop)

Quickstart Tutorial

Quickstart - Interactive Email Answering (Templates and keyboard acceleration)

  • Install & Run the software

  • Setup one or more email I/O accounts (MS Outlook, MAPI, POP/SMTP, ..) in Menu/Config/Email IO Accounts
    MS Outlook accounts: In order to suppress the MS Outlook Security Confirmation Dialog, please install also ExpressClickYes

  • Synchronize your email inbox: Press the Sync(hronization) toolbar button

  • Every answer action in TEA is handled by an 'answer template'. Take a look at the pre-defined example answer templates on the right side of the user interface.  Open the editor for a template by doing a mouse-right-click / Edit ..

  • An answer template can define:

    • Answer message template / text snippet: subject + body. 
      Supports variables and recursive inclusion of other templates

    • Short name of the template (=> keyboard acceleration & Ctrl-F9 access) and optional full name

    • Auto-shift target folder & confirmation settings: The answered email is shifted to this folder

    • Forwarding email address: When setting this option the template is forwarding, not answering!

    • Answer macro: Optional Python script which is executed when answer template is triggered. See examples "A:..." in drop-down list above the script editor. Programming/API

    • Classification macro: Optional Python script which is executed when emails are classified in order to find the most appropriate template.  See examples "C:..." in drop-down list above the script editor.
      Programming/API

  • Once you have your incoming mails in TEA's inbox, you can trigger answer templates by simply typing the starting letters of template's keynames.

  • Try triggering the [default] answer template by typing the letters  d e f   while your inbox cursor is on a mail

  • Access text snippets quickly in Windows by pressing Ctrl-F9 or the hot key definied in Menu/Config/Welcome Config

  • Setup your first answer templates by pressing the "New Template" button in the toolbar

  • Take also a look on Menu/Config/Auto-Responders.

  • Delete a mail with BACKSPACE key or DELETE key or by typing  d e l  - the beginning
    letters of the [delete] template.

Quickstart - Autoresponder (automatic reply to certain or all incoming emails)

Use case: Autorespond to emails from certain 'From'-addresses and with certain Subject

  • Install & start the Turbo Email Answer software. 

  • Setup an email I/O account as described in above tutorial

  • Create a normal answer template

    • Press the "New Templ." button in toolbar; Enter a short name for the template. E.g. "auto_disney"

    • Edit the subject & text message body

    • Set the classification macro which computes the responsibility for certain incoming emails. The macro must return points (0..100) to vote for the responsibility of the template. 
      Some examples ready for copy&paste to the Classification macro editor.

      Respond to certain subjects:

      if mail.Subject.startswith("Hello"):
         Return(100)


      Respond to certain from addresses: *@disney.com or  *@disney.us:

      if re.search(r"@disney\.com|@disney\.us", mail.From):
         Return(100)


      Respond to a certain from address and lowercase'd subject:

      if mail.From=="walt@disney.com" and "Hello" in mail.Subject:
         Return(100)


      Respond to a certain from address or partial string in lower-case'd subject:

      if mail.From=="walt@disney.com":
         Return(100)
      if "hello" in mail.Subject.lower():
         Return(100)


      Simply respond to all mails (e.g. for out-of-office replies):

      Return(100)


      More about powerful Regular Expression matching (re.search, re.match, ...)

      More about TEA Macro Programming/API

  • Test the template by selecting an email in the inbox and double-clicking the template - or right-click/Answer to selected mail

  • Test if the classification is matching the template against intended existing emails in the inbox by pressing the "Class Inbox" button.

  • Open Menu/Config/Autoresponders

    • Press the "Add" Button to add and activate the template (auto_disney) defined above as actual auto-responder

    • Activate the checkbox for periodic Automatic global IO synchronization

    • Activate checkbox simulate sending and/or direct sending for the autoresponder by setting the checkboxes and probability levels.
      Note: Simulated sending puts the answer mail to the draft folder of TEA / Outlook / IMAP etc. 

  • Watch if the Automatic Sync works and if matched mails get auto-answered as intended. Adjust the template for better matches.

 

 

Updating the software

  • Download the latest installer (Download) and install it over the the existing installation. No prior un-installation necessary.
  • Corrupted installations: Try the following in this order:
    • Backup your *.tea database file(s) to a save place
    • Reinstall the latest full installer over the existing installation; Check
    • Uninstall the current installation (without or with your database files *.tea) and install new; Check
    • Execute a Menu/Config/Reset Config; Exit & Restart; Check
    • Execute a Menu/Config/Reset Database; Exit & Restart; Check
    • See FAQ / Trouble Shooting

Uninstallation

  • Run "Uninstall" from the HarvEX menu in the Windows start menu or from Windows software manager (control panel); You can choose if you want also to remove your database*.tea file(s)

User Interface

Keyboard Acceleration

TEA is optimized for working quickly with keyboard and keyboard triggers.

Very important is the unique short key name for a template:

A template can be triggered from inside TEA (focus in mail-previewer) or after pressing the Windows Hotkey (Ctrl-F9) anywhere in Windows by typing the beginning letters of the short name. Example:

  d e f        

.. triggers the template with short name default for execution. In case of a hotkey trigger (Ctrl-F9 anywhere in Windows), the templates text body is copied to the clipboard.


Advanced:
Hierarchical short names / "groups": Special short names can be constructed by using the / slash character. Example short name:

 ebay/payment/1st

Such template can be hot-key triggered for execution by the sequence:

  e SPACE p        

The SPACE selects the next possible slash (/) separated sub group(s) for auto-completion. Thus the slash in key names enables to access kind of "sub-folders" of templates.

Triggering the Template Editor:  A leading TAB  triggers the template editor, not the template execution or template body copy. Example:

  TAB e SPACE p           (triggers editor - not execution)

triggers the template editor for the ebay/payment/1st template.

Email I/O Accounts Dialog

Setup your Email Accounts here ( MS Outlook, Outlook Express, Netscape, MAPI compliant clients, standalone POP/IMAP/SMTP ).

Add Button

Choose an account type and edit the account details

Hint when using MS Outlook: In order to suppress the Outlook security confirmation dialog, please install also Express ClickYes

Automatic global synchronization every X minutes.

Accounts flagged for 'global sync' can be enabled for periodic synchronization

Set as #1

The first account in the list is the default account. E.g. used when pressing the new-mail button in the toolbar.

Auto-Responder Setup Dialog

See also: Quickstart - Autoresponder

In this dialog you can activate certain (existing) templates as autoresponders. 

Checklist for setting up an autoresponder: 

  • First set up a normal answer template in TEA as you would do for interactive email answering. Set e.g. a message subject/text, auto-shift-folder, forwarding, answer macros etc.
  • Take care to set up a (simple) classification macro inside the macro which matches against certain 'from'-addresses, subjects, text or simply all incoming emails which you want to be answered by this template. The macro has to return a high value when it is responsible for a mail. No programming experience is needed for simple tasks. See/copy the macro examples in Quickstart - Autoresponder
  • Then activate the template for autoresponse purposes by adding it to the auto-responder list in this Autoresponder Setup Dialog. 
  • Activate periodic Automatic global IO synchronization in this Autoresponder Setup Dialog
  • Activate Simulated sending and/or directed sending for the autoresponder by setting the checkboxes and probability levels in this Autoresponder Setup Dialog

An auto-responder template's classification macro must return probability points high enough in the success case in order to pass the probability threshhold's configured in this setup dialog.

Examples for a classification macro:

A template's classification macro which does global unconditional auto-response to any incoming mail can be as simple as:

Return(90)  #90% class probability

A selective auto-response template would have a classification macro like:

if ( mail.Subject.startswith("Support Request:") and
     mail.From=="cgiform@mycompany.com" ):
   Return(100)

Add Button

Choose an existing template for inclusion in the auto-response list.

Automatic global snyc time

Automatic periodic email I/O sync is usually required for auto-responder operation. If not enabled, auto-response takes place upon manual Sync (Sync button in toolbar)

Auto-Response: Send directly ...

Enable and set a probability threshold to enable direct sending of the auto-response

Auto-Response: Simulation to draft folder ...

Enable and set a probability threshold to enable putting the auto-response answer into the draft folder of the corresponding email I/O system. E.g. in MS Outlook's own draft folder. Thus you can make a save auto-response simulation by enabling this but not enabling Auto-Response: Send directly ...

Auto-Response: Classify mails only amonst auto-response templates ...

Set this option to make classification for auto-response only amongst auto-response templates.
( By default during an auto-response check cycle the incoming mail is classified by all templates with a class macro. Thus if the winning template with highest probability points is not a AR template, no auto-response takes place. )

Log File

Enable and set a log file for tracing auto-response actions

General Settings Dialog

Set general options here.

Min. number of characters for auto-sene

If you type the beginning letters of keynames of template while the curson is in inbox/preview, TEA tries autocompletion in order to trigger the template quickly. Here you can set the minimum number of letters to be typed for triggering. Thus you can avoid accidential triggers. If your template's keyname is shorter than this minimum, you have to add trailing SPACEs in order to reach such template.

Keyboard auto-sense reset timeout

Auto-sense for template's short keynames is cancel after not entering new letters within this timeout period.

Text template answers to HTML are always forced to text-only (no HTML mail generation)

If you don't want to answer with HTML mail on incoming HTML mail, check this option

 

Mail Transfer Settings

  • HTML Mail: Send also a text version
    When checking this option, a text-only extract of the HTML message is inserted in the mail. Thus the mail can be displayed by non-MIME & non-HTML email readers
     
  • HTML Editor: Editor call
    Set a startup call for your favorite HTML editor here or select a template call from the drop-down list. The dummy-call "IE>=5.5" uses the HTML editor of the MS Internet Explorer (version >= 5.5), which is available on most PC's. If no other good editor is installed on your system, it is recommended to install Mozilla or Netscape.
     
  • Block-by-block SMTP transmissions: Number of seconds
    Set the number of seconds to wait between block-by-block SMTP transmissions
  • X-Mailer Tag
    This tag - representing the visible name of the mail client software - is only used for native SMTP transfer (standalone POP/IMAP client accounts)

Backup & Auto Save Configuration

  • A rotating backup of the main application database (database.tea) to files like C:\Program Files\TEA\database[1-9].tea can be configured here. Note: [1-9] is cyclically replaced by 1, 2, ... 9 upon subsequent backups. 
    By default no auto-backup is done.
    When you want to recover a certain backup with Menu/Config/Restore a Backup, then a good idea is to look at the file time stamp (last modified) of the backup files. A good file with highest time stamp is usually the best backup file for recovery.
  • The Auto-Save period [minutes] for saviing the application data (bid manager data, macro data etc.) periodically can be set here. 0 ( --- ) means that no auto-save takes place. The default is 10 minutes. 

Menu/Config/Set Application Database Location

The pre-define main application database (template and mail data, ...) is stored in a file <TEA-Program-Folder>/database.tea. If you don't like this location, e.g. because you have a multi-user environment with restrictions on the program folder you can change the database location e.g. to personal folders. 

Common Base Macros

Hint: See Python Language for details of the macro language and TEA's macro API.

  • Answer Base Macro
    This macro is always executed before execution of the template's individual answer macro. The computed name space (all set variables) is also inherited to the template's macro.
  • Classification Base Macro
    This macro is always executed before execution of the template's individual classification macro. The computed name space (all set variables) is also inherited to the template's macro.
     
  • Application Init Macro
    This macro is executed when TEA starts (or when you press the "Run App Init Macro" button in this dialog. The computed name space (all set variables) is also inherited to the other 2 Base Macros! Thus can e.g. define global utility functions etc... like:

    def test_from_me():
        return 'xellsoft.com' in mail.From

    A special function is def email_once_script_classifier(). If this function is defined here, then it is executed once for all templates when a new mail is classified (the Classification Base Macro is executed for each template which is classified against the new mail). This can improve run-time for complex classification setups.

    def email_once_script_classifier():
        global from_me
        from_me=test_from_me() # mail.From is constant for each template!

      

Internal Mail Editor

This dialog lets you view, edit and compose mails directly inside Turbo Email Answer. Is usually used when TEA is used for mail from or for POP/SMTP/IMAP accounts ( TEA as standalone email client ).
Annotation: When using MS Outlook or any other external ( MAPI compliant ) mail software, then you would by default use the mail composer of that external software.

HTML / Preview / Edit HTML / Refresh 
Using this options you can create setup a HTML message. 

Attachment Buttons  S / V / + / -
Save, View, Add or Delete an attachment. 

Save Button
Save the mail in the internal "Draft" folder. You can resume editing by double-clicking or right-click/edit the mail in the "Draft" folder.

Send Button
Put the mail into the "Out" folder. By defautl the actual transfer is done when you synchronize that POP/IMAP & SMTP account next time. After the transwer the mail is archived in the "Sent" folder.
You can re-edit a mail in the "Out" folder by double-clicking or right-click/edit the mail. 

Template Editor Dialog

In this dialog you can set the main answer text body (or HTML) & subject of the template, the target-shift-folder and the optional answer macro and classification macro.

Hint: See Python Language for details of the macro language and TEA's macro API.

  • Short Name
    This is the unique short key name for the template. A template can be triggered from inside TEA or after pressing the Windows Hotkey (Ctrl-F9) anywhere in Window by typing the beginning letters of a short name. Example:

      d e f        

    .. triggers the template with short name default for execution. In case of a hotkey trigger (Ctrl-F9 anywhere in Windows), the templates text body is copied to the clipboard.


    Advanced:
    Hierarchical short names / "groups": Special short names can be constructed by using the / slash character. Example short name:

     ebay/payment/1st

    Such template can be hot-key triggered for execution by the sequence:

      e SPACE p        

    The SPACE selects the next possible slash (/) separated sub group(s) for auto-completion. Thus the slash in key names enables to access kind of "sub-folders" of templates.

    Hotkey Annotation:  A leading TAB  triggers the template editor, not the template execution or hotkey copy. Example:

      TAB e SPACE p           (triggers editor - not execution)

    triggers the template editor for the example above.
  • Full Name 
    An optional long name
     
  • Create Answer Message 
    Uncheck this if you don't want to trigger a answer message at all, but only use the shift and optional macro functions of this template
     
  • Default Reply Only 
    Check this option if you don't want to come up with a template text & subject but use the plain old default reply body of the Email I/O's normal reply mechanism. (Thus you use only the auto-shift and macro functions. 
    Hint: if the answer macro sets ret.reply_body or ret.reply_subject (e.g.: 

       ret.reply_body="computed body" 

    ), this overrides the "Default Reply Only" setting by macro force.
     
  • Remember as future default message 
    Set this option => When you create your next new template. The current body&subject&forward address are used are pre-set default values
     
  • Forward To 
    If this option is set, a Mail-Forwarding is executed, not a normal Reply. Also the Forward Address is pre-inserted as To-Address in the mail-editor or is used as definite To-target in the automatic Auto-Responder.
      
  • Subject & Text Body 
    The template message, which can be enriched with variables. 
    Variables are enclosed in %-characters like:

      %var%   

    (
    no whitespace allowed in variable/expression)  or  enclosed in '%('  and ')%' like:

      %(long var expression)%

    (whitespace allowed in pythonic macro expression).
    There are special variable expressions for inserting another template's text body: E.g.: 

      %T:signature_short% 

    inserts the text body of the [signature_short] template - Which is short-cut for

      %TBody('signature_short')% 


    Example template text body enriched with variables and macro expressions:

       Hello %mail.FromName%, 
      how are you?
     
    %(user_flag and "text1" or "text2")% 
      %T:signature%

      %ret.reply_body%

    Some variable examples can be looked up in the example drow-down list on top right of the template editor. 
    Hint: See Python Language for details of the macro language and TEA's macro API for the complete set of variables and macro expressions. 

  • HTML / Preview / Edit HTML / Refresh 
    Using this options you can setup a HTML message body. 
    Hints:  
    • Variables are defined in the same style as for normal text bodies: %var% %(var expr)%
    • TEA cross computes Text<=>HTML back and forth according to incoming mail HTML status and Menu/Config/GeneralSettings/Force to text-only.
       
  • Auto Shift Answered Email to Folder
    Set the pre-set shift target folder where the original email is supposed to be shifted to when answered with this template. The shift target folder is presented as default in the shift confirmation dialog, or taken unconditional when the Auto-confirm option is set as well. 
    Leave this filed empty when no shift should be triggered, an the original mail should remain in the inbox.
  • Remember as future default folder 
    If set: When you create the next new template the current shift target folder is pre-set as default.
     
  • Auto-confim  shift ...
    Set this option if no confirmation&selection dialog should be displayed when shifting. Thus the shift occurs unconditionally. This option can be used also when the template is set up for auto-response.
     
  • Join confirmation for multiple emails 
    When you select multiple emails and trigger a template (or multiple pre-classified templates with 2 x SPACE) for all the selected emails, than the shift confirmation can be pre-set for combined confirmation.
    Example: Select 3 mails in the inbox and double click a template [report_backup]: You can confirm shifting those 3 mails to folder inbox/backup/report with one OK.
  • Answer macro script 
    If non-empty, this script is executed at the time, when the answer template is triggered manually or by the autoresponder. 
    By this method the response mail & behavior can be altered programmatically.
    See Python Language for details of the macro language and TEA's macro API for the complete set of available context objects, variables and functions. 
    Simple Example:
    if "Request Delivery" in mail.Subject:
       ret.reply_subject="MyRE: "+ret.reply_subject
       ret.reply_body="See attachment - Thanks"
       ret.AddFileAttachment("C:/data/mydelivery.pdf")
       ret.CC="to_me_too@myserver.dom"
       ret.BCC="to_me_also@myserver.dom"
       ret.forward_flag=1
       ret.forward_address="fw_adr@someserver.dom"
       ret.target_shift_folder = "inbox/pdfdelivered"

     

  • Classification macro script 
    If non-empty, this script is executed when a mail is (pre-)classified with this template - either by pressing the Classification button in toolbar/menu or during autoresponse analyis when new incoming mail is received. 
    The main purpose of this script is to return a high probability value, when it feels to be responsible for the mail.
    It is recommend to return a value between 0 and 100 (probability in %). Yet higher values can be used as well. The template with highest return value wins. A non-return or empty script is considered as 0 probability.
    Simple Example:
    if "SynchronEX" in mail.Subject and "@xellsoft.com" in mail.From:
       Return(70)

    A common job for more complex text body classifications is to combine probabilities for multiple independent words and phrases. TEA's api function api.wordclass is prepared to do this. 
    Example:.

    r=api.wordclass("good|very good:90|hmmmm:60|bad:30|no no:0",
                    mail.TextBody() )
    if r>65: Return(points)  #threshold

    # killer:0 .. neutral:50 .. perfect:100 , default :70

    (in future updates of TEA this word&phrase classificator will be offered as GUI table)

    Advanced: The function api.bayes_combined_prob_100 can be used on a probability value list to combine computed independent probabilities like:

    probs=[]
    probs.append( my_matcher1() )
    probs.append( my_matcher2() )
    probs.append( my_matcher3() )
    r=api.bayes_combined_prob_100(probs)
    if r>70: return r  #threshold

    The values in the input list for api.bayes_combined_prob_100 have to range from 0.0 to 100.0. 
    50 is the neutral value ("no statement"). Values >50 are good, values <50 are explicitly bad. One value of 100 in the list, forces the combined value to 100 ("force"). One value of 0.0 forces to 0.0 ("killer"). 0.0 wins overall. The mathematical background is the combination of independent probabilities. 
     

  • Autoresponse-Template  - Checkbox 
    Set that checkbox in order to activate this template for the automatic response schedule as configured in Menu/Config/Auto-Responders
    (Same effect as adding/deleting in Menu/Config/Auto-Responders)
     
  • Global  ( Classification macro )  - Checkbox
    Un-set this option if this template should not be include in global inbox classification but only when classification is triggered by select-templates/right-click/classify..with selected template(s) 

 

TEA Macro Programming / API

See Python Language for details of the underlying Python macro language.

Global Variables & Functions

  • TBody(template_name)
    Return the (computed) text body of another other template
     
  • In answer macros: The variables of the original mail object are embedded directly in the main namespace (in addition to object access over mail.xxxx )

Pre-defined objects & modules in main name space

Further modules can be import'ed. e.g. 

api Module

  • api.Re(s)
    Generates a Re-String from a Subject like string:
       "ABC" -> "Re: ABC";   
       "Re: ABC" -> "Re[2]: ABC"
       "Re[2]: ABC" -> "Re[3]: ABC"
       "AW: ABC" -> "Re[2]: ABC"
    Variable Example:
        %api.Re(mail.Subject)%
     
  • api.ReplyQuote(s,quotestring="> ")):
    Return a string quoted for email reply purposes
     
  • api.GetSimpleInput(description="", title="", prefilled_string=""):
    Request a user string input. Returns a string or None (=Cancel)
     
  • api.wordclass(list_phrases, text):
    see Template Editor / Classification Macro
     
  • api.bayes_combined_prob_100(lProbabilities):
    see Template Editor / Classification Macro
     
  • bayes_combined_prob(lProbabilities):
    same as api.bayes_combined_prob_100, but works in value range 0.0..1.0
     

<Email> Object: Attributes & Functions

  • TextBody()        # returns the text message body
  • HTMLBody()        # returns the HTML message body
  • IsHTML()          # 1 / 0
  • Subject = ""
  • From = ""
  • FromName = ""
  • To = ""
  • ToName = ""
  • Reply = ""
  • io_name="<unknown>"   # "Outlook"
  • uid = ""              # unique id: string
  • time_received = 0
  • time_sent = 0
  • has_attachments = 0
  • template_classified = ""       # "newsletter"
  • answered = 0      # is already answered?
  • isnew = 1         # is a new non-read incoming mail
  • uid = "" # unique id: string or int
  • CC = ""           # ,-separated list-string (or list [])
  • BCC = ""          # ,-separated list-string (or list [])
  • Reply = ""
  • has_attachments = 0
  • Attachments()     # return attachment objects
  • ...

<AnswerTemplate> Object: Attributes & Functions

Usage: set/get these attributes like ret.reply_subject="My Subject" inside a Template-Answer-Script .

  • reply_subject=""  # in answer macros: pre-computed reply-subject
  • reply_body=""     # in answer macros: pre-computed reply-body
  • sn=""             # template short name
  • name=""           # template full name
  • subject="Re: %Subject%"
  • text=""
  • script=""         # pre-answer script; executed on reply generation
  • script_classifier="" # classifier script;
  • target_shift_folder = "" # shift org email after answer: #
  • does_textanswer=1 # 0: only shift & script execution
  • dont_render=0
  • no_shift_confirm=0
  • join_multi_confirm=0
  • forward_flag=0    # 1: this is a forwarding template
  • forward_address=""# mail is sent to this address if forward_flag=1
                      # format: me@server.dom  / oder: "ME" <me@server.dom>
  • To=''             # set it to override reply address (similar to forward_flag+forward_address)
  • CC=""             # ,-separated list of carbon copy email addresses 
  • BCC=""            # ,-separated list of blind CC email addresses
  • ishtml=0          # 1: is a HTML template
  • global_class=1    # the template is registered a (read-only)
  • AddFileAttachment(path)  # ret.AddFileAttachment("C:/data/mydelivery.pdf")
  • ...

<Attachment> Object: Attributes & Functions

  • path=""     # disk path to the attachment file
  • name=""     # name of the attachment

 

ODBC Module

The odbc module is pre-imported. It can be directly used in TEA scripts and enables SQL execution. 

Usage:

c=odbc.odbc('myaccess_db').cursor()
c.execute("SELECT * from newsletter_abo WHERE email='hello@world.com'")
data_list=c.fetchall()
if not data_list:
c.execute("INSERT INTO newsletter_abo (email, letter, creationdate) VALUES \
('hello@world.com', 'football','18/04/2006 13:45:00')" )


HOW-TO

" How to setup an auto-responder ? "

  1. see Quickstart Autoresponder

" How to add attachments answer templates/macros? "

  • Add something like the following to the answer macro of that template:
    ret.AddFileAttachment("C:/data/mydelivery.pdf")

" How to interact with ODBC / databases in Turbo-Email-Answer-Macros ? "

  • An ODBC API is pre-installed in Turbo Email Answer. Set up an answer macro inside an answer template as shown in this example

FAQ & Trouble Shooting

" How do I suppress the security confirmation dialog of MS Outlook ? "

  • In order to suppress the Outlook Security Confirmation Dialog, please install Express ClickYes - works with all recent MS Outlook versions: 2000 SR2 .. 2003

" How to most quickly copy a template text to Windows Clipboard ? "

  • When one-click-copy-on-select is activated: Simply make a single right-click on a template in the list and the template text body is copied to the clipboard. (See message in status bar of TEA)
  • Anywhere in Window press Ctrl-F9 and access the templates by keyboard auto-completion

" I get an error like 'getaddrinfo failed' !? "

  • you have no proper internet connection at all
  • check if your browser and ordinary email client software work with the same SMTP address !?
  • ( SMTP proxies are not currently supported )

" I get (nearly) all target addresses refused from my SMTP Mail Server "

  • your SMTP server doesn't like something in your mailings; 
  • change the X-Mailer Tag in Menu/Config/SMTP Settings
  • most SMTP servers want you to use really your correct 'from' address for your SMTP account. 
  • try a "local SMTP server" like : and set localhost:25 (no user/password) as SMTP server in TurboMailer. This bypasses your ISPs SMTP server (as long as port 25 communication is not restricted in you environment). 

Turbo Email Answer box


TEA main page.
Buy Now! Buy Now!
Features


TurboMailer - Bulk Email Software & Address List Manager
HarvEX eBay sniping & automation software
SynchronEX File Synchronizer and FTP software

Xellsoft Custom Software