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 at http://www.xellsoft.com/python_ultra_short.html 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% |
- 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.
- 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)
|