Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

REQUEST-MAIL-ORDER-RESULT - Request e-mail send order result

&pagelevel(4)&pagelevel

Domain:

UTILITIES

Required authorization:

STD-PROCESSING
TSOS

You can use the REQUEST-MAIL-ORDER-RESULT command to query the execution status of the mail send order. The status is returned by the backend task after the order is processed. The order data is deleted from the internal ASTI tables. The associated SYS file under the user ID of the mail sender is deleted.

The REQUEST-MAIL-ORDER-RESULT command does not provide any information on orders that have not yet been processed. In this case, you can use the SHOW-MAIL-ORDER-STATUS command to get information on the order (see "SHOW-MAIL-ORDER-STATUS - Query information on mail orders"). The REQUEST-MAIL-ORDER-RESULT command supports structured output in S variables (see the manual “Commands, Volume 6, S Variables”).

REQUEST-MAIL-ORDER-RESULT

ORDER-ID = *ANY / <x-text 1..16>

,WAIT-FOR-RESULT = *NO / *YES

,USER-OPTION-FILE = *STD / <filename 1..54 without-gen>

Operands

ORDER-ID = *ANY / <x-text 1..16>
Specifies the order whose execution status is queried.

ORDER-ID = *ANY
The execution status of a completed order sent by the command caller is queried. If there are several completed orders, it is not specified which of these orders’ status is queried.

ORDER-ID = <x-text 1..16>
ASTI order ID of the order whose execution status is queried.

WAIT-FOR-RESULT = *NO / *YES
Specifies whether the command waits until the processing of the order is completed.

WAIT-FOR-RESULT = *NO
The command does not wait for the end of an order that is not yet completed. You can query the execution status of the order subsequently by calling REQUEST-MAIL-ORDER-RESULT again.

WAIT-FOR-RESULT = *YES
The command waits until the order is completed.
If ORDER-ID=*ANY is specified, waiting is implemented internally by means of regular queries at intervals of 60 seconds, so that waiting is completed an average of 30 seconds after the end of the order.

USER-OPTION-FILE = *STD / <filename 1..54 without-gen>
Specifies a user option file containing default values for different operands. You will find a detailed description of the user option file in the section “Configuration file for the mail sender frontend (user option file)”.

USER-OPTION-FILE = *STD
The default user options are obtained from the file specified in the SYSSSI option file with the defaultOptionFileName option (see “interNet Services BS2000 (Related publications), Administrator Guide (Related publications)”). The default setting for this option is SYSDAT.MAIL.nnn.USER.OPT.

USER-OPTION-FILE = <filename 1..54 without-gen>
The file specified here is used as the user option file.

Return codes

(SC2)

SC1

Maincode

Meaning


0CMD0001No error.

32CMD0220Internal error.

32CMD2009Error during creation of the S variable.

64YML0120ASTI subsystem not available.

32YML0176Unexpected ASTI error.

64YML0210Order was not found.

128YML0214Resources are exhausted.

64YML0215A result was not requested when the order was issued.

64YML0216The order was executed by an external task.

128YML0222Order not completed.


Examples


/REQUEST-MAIL-ORDER-RESULT ORDER-ID=02BC49BB0000000D
%  ORDER-ID:              02BC49BB0000000D
%  RETURN CODE:           Ok
%  RETURN MESSAGE:        250 Ok: queued as 0E7026E860



/EXECUTE-CMD CMD=(REQUEST-MAIL-ORDER-RESULT ORDER-ID= 02BC49BB00000017),-
/
             STRUCTURE-OUTPUT=OUT
%  ORDER-ID:              02BC49BB00000017
%  RETURN CODE:           Ok
%  RETURN MESSAGE:        250 Ok: queued as 2B9AE6E860


/SHOW-VARIABLE OUT
OUT(*LIST).ORDER-ID =      02BC49BB00000017
OUT(*LIST).RETURN-CODE =   Ok
OUT(*LIST).RETURN-MSG =    250 Ok: queued as 2B9AE6E860


Output data

When an order is terminated, the command outputs three lines containing information on the execution status.

  • The first line (ORDER-ID) specifies the ID of the order for which the data is specified. This is relevant, above all, if ORDER-ID=*ANY was specified.

  • The second line (RETURN CODE) specifies whether an error has occurred and, if so, which one. The possible values are:

OK

The e-mail was sent successfully.

Error during SMTP protocol

The mail server reported an error to the backend task.

Error during S/MIME operation

An error occurred during S/MIME processing (e.g. certificate problems).

Internal error

In the case of all other errors.

  • The third line (RETURN MESSAGE) contains the following information:

    • In the event of an error:
      Additional textual information on the error.

    • In the event of a successfully terminated order:
      Concluding message of the mail server. This message generally contains the (partial) message ID, indicating that the e-mail was rejected by the server. If an error occurs subsequently in the course of mail transfer, the administrator can use this ID to trace the transfer of the e-mail across the chain of mail servers.

The data can also be transferred to an S variable structured in accordance with the output of the command.