SEND

The SEND command is used to return a response to the AS2 client program.

The SEND command internally uses the Disposition-Notification-To and the Disposition-Notification-Options received from the client program to help in automatic creation of a response.

If a synchronous receipt was requested, a receipt must be sent.

If an asynchronous receipt was requested, a basic 200 OK response is sent.

Note: For asynchronous receipts, the receipt may be sent later to the requested address. The Receipt-Delivery-Option contains the delivery URL.

The list argument will be returned with the following keywords and values:

Keyword

Description

MESSAGEID

Message-Id of the receipt sent.

SUBJECT

Subject on the receipt.

FROM

From value on the receipt.

DATE

Date on the receipt.

 

 

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

SEND

RESPONSE

*DEFAULT

Mandatory. The type of response is automatically determined from the client request. Either basic, receipt or signed receipt is returned.

*OK

This will send a basic OK (200 HTTP response). This response should only be used if an asynchronous receipt was requested.

*ERROR

Send an error receipt.

FROM

value

Optional. From.

SUBJECT

value

Optional. Subject.

TEXT

value

Optional. Text.

PROCESSED

value

Optional. Default value is "processed".

MODIFER

value

Optional. Default value is blank or "error" for response *ERROR.

MESSAGEID

value

Optional. Complete transaction message id. The Message-Id is normally generated.

RECEIPTMICALG

*SHA1
*SHA224
*SHA256
*SHA384
*SHA512

Optional. Receipt MIC algorithm. The default value is *SHA1.

 

 

The RECEIVER keyword value is used to create the following receipt information.

 receipt.from.{receiver} = email address

 receipt.from = email address

 receipt.subject.{receiver} = subject

 receipt.subject = subject

 messageid.prefix.{recipient} = company identifier

 messageid.prefix. = company identifier

 

Human readable text is obtained from files using a properties file selection hierarchy.

 receipt.message.{receiver} = system/receipt-message.txt

 receipt.message = system/receipt-message.txt

 receipt.text.{receiver} = system/receipt-text.txt

 receipt.text = system/receipt-text.txt

 receipt.error.{receiver} = system/receipt-error.txt

 receipt.error = system/receipt-error.txt

 

The receipt.message contains the human readable component of the receipt.

The receipt.text contains the text that is sent as the body content in a 200 OK basic response. It is sent as content type text/plain.

The receipt.error contains the human readable component of the error receipt.

The following special merge labels are supported in the receipt.text, receipt.message and receipt.error files:

%%COMPANYFROM%%
%%COMPANYTO%%
%%DATE%%
%%SUBJECT%%
%%TEXT%%

Sample receipt.message file content:

The message sent to recipient <%%COMPANYTO%%> on %%DATE%% with subject "%%SUBJECT%%" has been received.

Sample receipt.text file content:

Data from <%%COMPANYFROM%%> has been received by <%%COMPANYTO%%>

Sample receipt.error file content:

The message sent  to recipient <%%COMPANYTO%%> on %%DATE%% with subject "%%SUBJECT%%" contains the  following error %%TEXT%%.