2.6.1 Defining an email reception monitoring job
To receive email, define the mail reception using either of the following methods:
-
In the Jobnet Editor window of JP1/AJS3 - View, define the email Receive Mail job.
-
Define the necessary information in the unit definition file and execute the ajsdefine command.
As the details (or parameters) of email reception, specify the following items:
-
Platform
-
Profile name (for Windows)
-
List of senders, list of subjects, list of message texts
In addition, you can specify the list file for attached files (in Windows) or the list of received email (in UNIX) as required.
- Organization of this subsection
(1) Judging whether received email satisfies the monitoring conditions
A list of senders, a list of subjects, and a list of message texts can be used as monitoring conditions for received email. You must set at least one of these three conditions. The system assumes that an event occurred when a message satisfies all the conditions you set. If any of the conditions is not satisfied, the system assumes that an event has not occurred.
The three monitoring conditions are described below.
-
List of senders
Judgment is based on whether the sender of a received email matches a sender you specified.
This condition is satisfied if the email address of the sender matches an email address in the list of senders.
If a sender's email address or an email address set as a condition includes a single-byte space, the space is ignored for judgment purposes.
-
List of subjects
Judgment is based on whether the subject line of a received email contains the specified character string.
This condition is satisfied if the subject line of the email contains a character string specified in the list of subjects. If you specify more than one character string in the list of subjects, an email message satisfies the condition if its subject line contains any one of those character strings.
If the subject of an email or a character string specified in the list of subjects includes a single-byte space, the space is ignored for judgment purposes.
-
List of message texts
Judgment is based on whether the body of a received email contains the specified character string.
This condition is satisfied if the body of the email contains a character string specified in the list of message texts. If you specify more than one character string in the list of message texts, an email message satisfies the condition if its body contains any one of those character strings.
If the body of an email or a character string specified in the list of message texts includes a single-byte space, the space is ignored for judgment purposes.
- Cautionary notes
-
-
In UNIX, of files attached to an email in MIME format, only text files can be judged according to the list of message texts condition.
-
Depending on the configuration of the mail system, information might be added to the sender's email address when email is received. For example, information might be added if the mail server is connected via a gateway.
-
With the email reception monitoring job, the sender's email address satisfies the condition only when the whole address matches. The format of the email address set in received email as the sender address depends on what protocol the sender uses to connect to the mail server (for example, connecting with an SMTP server or Exchange Server). The sender address format might also change according to the mail system specifications or settings. After the mail system has been set up, try sending and receiving email so that you can check the sender address format actually set in the received email.
The procedure for checking the sender address format is as follows:
-
-
Define an email reception monitoring job and an email sending job.
In the definition of the email reception monitoring job, specify a monitoring condition for the subject line or body, and specify MLRCVADDRESS (sender of received email) as the passing information.
In addition, define an email sending job that will be executed after the email reception monitoring job has judged that the condition is satisfied, and that will receive MLRCVADDRESS and set it for the subject line or the body.
-
Execute the email reception monitoring job.
-
Send email.
Make sure that you send arbitrary email that satisfies the monitoring condition specified in step 1.
-
Check the data that has been passed.
In the subject line or the body of the email sent by the email sending job, executed after the monitoring condition in the email reception monitoring job is satisfied, check the data that has been passed via MLRCVADDRESS.
For details about MLRCVADDRESS, see B. Information Passed by Event Jobs in the manual JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
-
-
In Windows, a host can execute a maximum of 60 email reception monitoring jobs. An error occurs at execution of the 61st and subsequent jobs. The same restriction applies when more than one scheduler service is active.
-