Posteingangsassistenten (EN-US)
Table of contents
The inbox assistant is one of the outstanding features of directmail. Many functions that are performed interactively, such as adding addresses to the address book, forwarding e-mails to colleagues, answering e-mails automatically when you are absent, and notifying you of incoming e-mails by cell phone, can be automated with the Inbox Assistant without manual intervention.
The Inbox Wizard can be called up globally across all mailboxes by selecting option 3 from the directmail menu, or per mailbox by selecting option 13 from the "Work with mailboxes" display.
Entries can be made in "Simplified Mode", or in "Expert Mode". We recommend that you gain experience with the "Simplified Mode" and only then use the Expert Mode. In the expert mode, functions can be combined more easily, without the definition being available more than once. E.g. in the expert mode you can add the address of the incoming e-mail to an address book, forward the e-mail to a colleague and send him a message about the received e-mail via cell phone The sequence is freely definable in the expert mode, fixed in the simplified mode.
Note: The "Delete" function is always executed last.
0149 - Inbox wizard
Description of the selection options
2=Change
Allows you to change an existing definition, redefine filters and initiate other actions.
3=Copy
To easily duplicate existing definitions which then only need to be modified.
4=Delete
Allows you to delete defined definitions.
8=Criteria
Displays the attributes of the definition. Before displaying, the mode must be changed from Simplified to Expert mode.
9=Functions
Displays the functions stored behind a definition.
12=Reset Hits
Resets the number of hits per definition.
Creating an inbox wizard definition
With F6 from the display "Work with inbox wizard" you can create a new definition. New definitions can be created either in simplified or expert mode.
0150 - Select definition type
Description of the selection options
1=Simplified mode
In the Simplified mode you can start using the Inbox Wizard functions without any experience. Definitions in the Simplified mode can be transferred to the Expert mode at any time.
2=Expert mode
Even more flexibility, even more functions are available in the expert mode. Use this mode if your first attempts with the Simplified Mode were successful.
The following demonstrates the possibilities of the Inbox Wizard based on the Simplified Mode.
Create definition (F6)
Each definition is given a unique name, via which the definition can be modified, activated, deactivated or deleted at any time.
0152 - Definition simplified mode
Name
One unique name per definition
Description
Here you enter the text description for it
Active
An entry can be active or inactive. This allows you to temporarily override functions.
Valid values are:
Y The definition is active
N The definition is inactive
Filter functions
With the help of the filter functions you limit the selected functions of the Inbox Assistant to the relevant e-mails.
Filter criteria in the simplified mode are always "AND" links, in the expert mode you can also insert "OR" links.
0152 - Definition of simplified mode
Hint:
1. If fields are left empty, the definition will be executed in any case, i.e. the field will not be considered in the selection, the content is not relevant for execution or non-execution.
2. Inputs are, except for yes/no criteria, always "string functions", i.e. the specified string must occur in the corresponding field to fulfill the filter criterion. In the search string, a "?" can be specified for unknown characters.
3. Upper/lower case is not important when entering strings
Definition
See previous chapter
Active
See previous chapter
Mailbox
The definition refers to a mailbox if the Inbox Wizard was created from a mailbox. Global definitions with Mailbox *ALL are possible from the menu.
Account
If you manage several e-mail accounts in your mailbox, you can restrict the definition to one account only
Absence
Specifies whether the definition should run in absence.
Valid values are:
J The definition is executed when the mailbox owner is absent due to the reasons described in chapter Absence absence(selection 14).
N The definition is executed if the mailbox owner is not absent.
From
The sender can be restricted here
Priority
Here you control whether the priority should play a role in the filter function.
Valid values are:
H Emails with high priority are considered
N E-mails with normal priority are considered
G E-mails with low priority will be considered
To
The recipient can be restricted here.
Attachments
Here you control whether attachments play a role in the filter function.
Valid values are:
Y Emails with attachments are taken into account
N E-mails without attachments are taken into account
Subject
The string in the Subject field is searched for.
Negative
This is a global parameter that negates all specified values. I.e. if you enter "MEIER" under To and J in this parameter, all e-mails that are not addressed to "MEIER" will be considered.
Text
The string is searched for in the text of the e-mail.
Phonetic
The phonetic search allows a text search within a mailbox for recipient, sender, subject and text.
Out of office message
The Out of office message function allows you to send a message to the sender of an e-mail when you are not at home. The message will tell the sender when you will be back and will process the email.
0153 - Absence definition
Enter J in the Absence field and 1 in the "Absence message" function to activate this function.
0154 - activated absence definition
Create address entry
Does it also happen to you from time to time that you receive an e-mail and have not immediately added the e-mail address of the sender to the address book. With this function of the Inbox Assistant this is a thing of the past. The senders of the applicable e-mails are automatically added to the address book.
The "Create address entry" function also allows you to automatically add customers and prospects to your e-mail distribution lists. In the following example, the senders of all e-mails in which "ENROLL" is written in the subject line are automatically added to an address book.
With this function you can easily create mailing lists that virtually maintain themselves.
0155 - Create address entry
Create address entry
Enter your filter criteria and at function "Create address entry" 1.
0156 - Select folder
Select the folder with 1 in which you want to save the address book entry.
0157 - Create address entry in folder External
Delete address entry
In the same way, you can automatically delete address entries from address books if the sender of the e-mail informs you that they do not want any more information.
0158 - Delete address entry
Enter your filter criteria and at function "Delete address entry" 1.
0159 - Select folder
Select the address book with 1 from which the address is to be deleted.
0160 - Delete address entry from address book External
Copy e-mail to folder
Here you can copy incoming e-mails into your folder structure depending on the filter criteria, so that e-mails from Sales, for example, end up in the "Sales" folder right away.
0161 - Copy e-mail to folder
Enter your filter criteria and 1 for the "Copy e-mail to folder" function.
0162 - Select folder
Select the folder with selection 1 into which the e-mail is to be copied. With selection 5 you can show or hide the structure.
0163 - Structure shown
0164 - E-mail copied to folder CMA/Deleted
Delete e-mail automatically
Who doesn't get annoyed by the eternal advertising or junk mails. With this function of the Inbox Assistant you can delete unwanted e-mail immediately without manual intervention. delete. This function is executed only after all other tasks have been completed. (Also in expert mode)
0165 - Delete e-mail automatically
Enter your filter criteria and for function "Delete e-mail" 1.
0166 - Delete e-mails AT CHEAP automatically
Redirect e-mail
E-mails that do not concern you can be immediately redirected to the appropriate recipient with directmail. You can also use the same function when you are absent to redirect your e-mails to your home address, or to a colleague.
0167 - Redirect e-mail
Enter your filter criteria and 1 for the "Redirect to recipient" function.
0168 - Select e-mail recipient
You can enter the e-mail address of the recipient directly here, or search for the address from the address book with F4.
0169 - Select address
Enter 1 in front of the address to be transferred. You can use all functions described in chapter Address book (selection 12).
Note: If you adopt an address with selection 1, but no e-mail address appears in the subsequent screen, it is probably because no e-mail address was entered in the address.
Original sender
Forwarded and redirected e-mails can optionally contain the name of the original sender, or the sender of the mailbox that forwarded or redirected the e-mail.
Valid values are:
J The address of the original message is used
N The address of the mailbox from which the forwarding/redirection is done will be used
0170 - Redirect to recipient pc2@messe.de
Send to fax recipient
With this function you can reach recipients who do not have an e-mail address. If you have DirectFax from TOOLMAKER installed on your IBM i, the text of the e-mail will be converted into a fax and delivered to the recipient by fax.
0171 - Send to fax recipient
Enter your filter criteria and at function "Send to fax recipient" 1.
0172 - Forward e-mail by fax
Select fax recipient
Enter the fax number of the recipient here, or select an address from the address books with F4. *OWNER sends the e-mail to the fax number contained in the address entry of the receiving mailbox
0173 - Send e-mail by fax
Forward e-mail
similar to Redirect, you can forward an incoming e-mail to your home address, or to a colleague. In this case, the original remains with you.
0174 - Forward e-mail
Enter your filter criteria and 1 for the "Forward to recipient" function.
0175 - Specify e-mail recipient
Enter the e-mail address of the recipient in the E-mail field, or select a recipient from an address book with F4.
Name - E-mail recipient
E-mail - E-mail address of the recipient
Original sender - Forwarded and redirected emails can optionally contain the name of the original sender, or the sender of the mailbox that forwarded, or redirected the email.
Valid values are:
J The address of the original message is used
N The address of the mailbox from which the forwarding/redirection is done is used
Note: if your system sends the e-mails via an SMTP server that is tLS encryption is mandatory (e.g. Office365), then you need at least version 5.50 with PTF 09 of directmail and it is necessary to adjust the configuration for this function. In this case, please follow the steps described here: Configure TLS encryption when forwarding via Inbox Wizard.
0176 - Forward to recipient pc2@messe.de
Move to folder
Allows you to move an incoming e-mail to a folder.
0177 - Move e-mail
Enter your filter criteria and for "Move to folder" enter 1.
0178 - Select folder
Enter selection 1 in front of the desired folder, with selection 5 you can show or hide the folder structure.
0179 - Move e-mail to folder PC01/Outbox/Archive
Print e-mail text
The header as well as the text part of an incoming e-mail can be printed automatically.
0180 - Print e-mail
Enter your filter criteria and if you select "Print message text" 1.
0181 - Select printer
Output queue
Output queue from which the message text is to be printed.
Library
Library of the output queue.
Stop
The printout can be optionally stopped,
Paper tray
Specifies the paper tray.
Copies
The number of copies can be freely selected.
0182 - Printout of e-mails on PRT01
Reply to e-mail
Incoming e-mails can be answered automatically with directmail. This allows you to send a reply to customers who order by e-mail, indicating that the e-mail has been received and the process is being handled.
0183 - Reply to e-mail automatically
Enter your filter criteria and for "Reply with email" enter 1.
0184 - Enter Mail ID
Mail ID
Each reply is based on a saved email that is stored in some folder. Select the reply e-mail with F4.
0185 - Select e-mail
0186 - Reply to request with e-mail test
Notification by GSM text
If you have installed GSM-Text from TOOLMAKER on your IBM i, you can notify any cell phone owner about the receipt of your e-mails. This way cell phone users get the information that an e-mail has arrived and the subject. Especially for field workers or mobile employees this is invaluable.
0187 - Email notification via SMS
Enter your filter criteria and for "SMS notification mobile" enter 1.
0188 - Enter cell phone number
Enter the cell phone number, or select an entry from the address books by pressing F4. *OWNER sends the e-mail to the SMS no. that is contained in the address entry of the receiving mailbox
0189 - Notification of a cell phone user
Combinations
You can run several functions one after another in the simplified mode by making several selections. The basis of the actions is always the filter function.
0190 - Combination of functions
Expert mode
In the expert mode you are even more flexible in the execution of your functions. You can start actions multiple times, define the sequence of actions and combine "AND" and "OR" conditions.
0191 - Expert mode
Combination of functions in expert mode
Filter functions in expert mode (criteria)
The filter function in the expert mode is essentially the same as the function in the simplified mode, with the difference that an additional exit program function and a further check for "already distributed" are available.
0192 - Exit program
Sequence no.
Enter here the sequence number in which the conditions are to be checked.
AND/OR
With AND/OR you can link conditions with each other.
Mailbox
The 10-character alphanumeric mailbox name with which this e-mail was received.
Account
Filter here the incoming mails by mail account
From
Filter here by sender
To
Filter here by recipient
Subject
Filter here by subject of incoming e-mails
Text
Filter here by strings in the text of the email
Absence
Here you filter the emails depending on the entered absence time:
Valid values are:
J Filter only e-mails received during an entered absence n Filter only e-mails
N Filter only e-mails that were not received during a registered absence during a registered absence.
Empty Do not consider absence
Attachments
Filter the e-mails to attachments dependencies
Valid values are:
J Filter only emails that contain attachments.
N Filter only emails that do not contain attachments.
Empty Do not consider attachments
Exit Program/Library
In addition to other filter functions, the Exit Program filter function allows a user-defined program to be called. This program is executed and must return a return code. Depending on the return code, the filter is considered applicable or not applicable. The following parameters are required:
Priority
Filter the emails by priority here
Valid values are:
H Filter only emails that have priority High
N Filter only emails that have priority Normal.
G Filter only emails that have priority Low.
Empty Do not consider priority
Negative
If you want to filter the emails that do NOT match the criteria, enter "Y" here
Library
Specify the library of the exit program.
Distributed
Filter here the e-mails according to the status of the distribution
Valid values are:
J Filter only emails that have already been distributed
N Filter only emails that have not yet been distributed.
Empty Do not consider distribution status
Phonetic
Filter emails by phonetics here
Valid values are:
Y Filter emails by phonetic search
N Do not filter emails by phonetic search
Adding functions in expert mode
When adding functions in expert mode, you have to enter function type, description and activity indicator, analogous to the simplified mode.
0193 - Add function
Sequence number
Enter here the current sequence number in which the instructions are to be processed.
Function type
Press F4 to display a list of available functions.
0194 - Expert mode functions 1st page
0195 - Expert mode functions 2nd page
Select the desired function with Selection 1.
Description
Here you can enter a description of the function. If you do not enter anything here, the stored description from the available functions is used.
Active
Here you control whether the function should also be executed or the action is temporarily deactivated.
Valid values are:
Y Function is active
N Function is not active.
0196 - Start user program function
Function descriptions
*ABSENT Absence message
0417 - *ABSENT Absence message
-
*ADRADD Create address entry
0417 - *ADRADD Absence message
*ADRRMV Delete address entry
0417 - *ADRRMV Delete address entry
*COPY Copy to folder
0419 - *COPY Copy to folder
*DELETE Delete message
*DETOUR Redirect to recipient
0418 - *DETOUR Redirect to recipient
*DIRARC Archive to DirectArchive
This function offers the possibility to preset an archive as well as indices with fixed values. Unlike Automail, the PE wizard is not able to determine index information, i.e. only constant values can be specified, which could only be preset differently by using different PE filters. Extracting subject, sender etc. and copying them into the archive indexes is done by DirectArchive.
Archive Enter the archive as defined in DirectArchive
Delete MIME file:
Index value Input of valid index values as defined in DirectArchive when defining the archive
0416 - *DIRARC Define DirectArchive export
*EXITPGM Call exit program
The *EXITPGM function allows to call your user program depending on set filter functions for incoming emails. With the *EXITPGM function you pass two constant parameters and further optional parameters to your exit program:
MAIL-ID a 20-character alphanumeric string contains the unique mail ID under which the e-mail is stored in the IFS.
MAILBOX the 10-character alphanumeric mailbox name with which this e-mail was received.
Parameter 3-9 variable definable alphanumeric parameters.
0197 - Specify exit program
You can select the sources of the optional parameters using the available parameters with the F4 key.
0198 - Parameter source selection
You now define the parameters actually passed to your program and their length variably as shown in the following example:
0199 - Parameter definition
Parameter3 is here a string from the subject with length 42 digits. The content of the parameter is extracted from a string specified in parentheses, starts 1 digit after the "(" character and ends one digit before the ")" character. For example, you can pass the parameter with length 42 from the subject "Order with license number (23432-23123-12341)" with the string "23432-23123-12341" to your program.
Parameter4 contains the first ten characters of the subject line
Parameter5 looks for the constant "Subject" in the first text line of the e-mail and passes the 25 characters after it (8 digits after the constant Subject) to the parameter.
With access to the following two files, a programmer can read the subject and the text content of the e-mail.
DMITMHDR Header file of the e-mail incl. subject text
DMITMTXT Text lines of the e-mail
The key for both files is the 20-character MAILID.
Below we have listed two examples of exit programs:
Sample program for exporting e-mail attachments
* ******************************************************************* * Sample Exit Program for exporting E-Mail attachments *** * (C) 2000 Toolmaker Software* ********************************************************************* c *entry plistcparmmailid 20cparmmailbox10 ccdo 9999attid 5 0 Cat EXPEMLATT commandceval clcmd='DIRMAIL/EXPEMLATT MAILID( 'c%trim(mailid)') ATTID(' c%trim(%editc(attid:'Z')) + c') PATH(''/dirmail/file.' c%trim(%editc(attid:'Z')) + ''') ' + c'REPLACE(YES)'ce xecute EXPEMLATT commandccall 'QCMDEXC50c parmclcmd 1000cparm 1000 cllen15 5 If error occured, assume, that all attachments have been exported cif *in50cleavecendifccenddoq uit programcsetonlr
Demo program directmail output mail text to source file
The program gets the internal mail ID as parameter and uses it to access the mail header file and the mail text file. The records are written to a source file EMLOUTF in QGPL (can be viewed with SEU). An output to QTEMP is not useful, because PE works in batch and the file would be unreachable there.
In the inbox wizard set the following:
FunctionDescription FunctionparameterActive*EXITPGM Demo EXIT Program CALL(EMLEXIT1) Yes
H*********************************************************************
H* *
H* Demo program directmail Output mail text to source file *
H* created 30.04.03/HW *
H* *
H* Requirements for the execution phase: *
H* 1. bibl. DIRMAIL must exist in *LIBL *
H* 2. file EMLOUTF in QGPL is not a data file of the user! *
H* *
F*********************************************************************
F* Mail header file *
Fdmitmhdr if e k disk usropn
F* Mail text file *
Fdmitmtxt if e k disk usropn
F* Demo output file for mail text *
Femloutf o f 92 disk usropn
D*********************************************************************
D* Record definition for source file (data structure)
Dsrcrec DS
D srcseq 1 6S 2
D srcdat 7 12S 0
D srcdta 13 92
c*********************************************************************
c* Input parameters of function *EXITPGM (PE/inbox assistant)
c *entry plist
c parm MailId 20
c parm MailBox 10
c*
c* Demo access to mail header file
c mailid chain itmhdrf 50
c*
c* Read all text records of the mail and output to demo file
c mailid setll itmtxtf
c do *hival
c mailid reade itmtxtf 5050
c 50 leave
c movel txdta srcdta
c write emloutf srccrec
c enddo
c*
c* end of program
c move *on *inlr
c*
c*****************************************************************
c* program start routine
c*
c *inzsr BEGSR
c*
c* delete/create demo file EMLOUTF in QGPL
c eval clcmd c 'CLRPFM FILE(QGPL/EMLOUTF)''
c exsr runcl
c if *in50
c eval clcmd c 'CRTSRCPF FILE(QGPL/EMLOUTF) ' +
c 'RCDLEN(92) MBR(*FILE)''
c exsr runcl
c endif
c*
c eval clcmd c 'OVRDBF FILE(EMLOUTF) ' +
c 'TOFILE(QGPL/EMLOUTF)' c exsr runcl
c exsr runcl
c*
c* Open all files
c open emloutf
c open dmitmhdr
c open dmitmtxt
c*
c ENDSR
c************************ *****************************************
c* Execute System Command
c*
c RunCl BEGSR
c CALL 'QCMDEXC' 50
c PARM ClCmd 256
c PARM 256 CmdLen 15 5
c*
c ENDSR
c*****************************************************************
*FAX Send to fax recipient
0420 - *FAX Send to fax recipient
*FORWARD Forward to recipient
0418 - *FORWARD Forward to recipient
*MOVE Move by folder
0419 - *MOVE Move to folder
*OPEN Mark email as opened
The *OPEN function is only available in expert mode and marks an incoming email that matches the filter criteria as opened.
*PRINT Print message text
0421 - *PRINT Print message text
*REPLY Reply with e-mail
0422 - *REPLY Reply with e-mail
*SMS SMS notification mobile phone
0423 - *SMS SMS notification mobile phone
*STOP e-mail distribution
Stops e-mail distribution for this function.
Combinations of functions
0201 - Combinations of functions in expert mode