Sending an AS2 Message | Aayu Technologies
Link Search Menu Expand Document

Sending an AS2 Message

After completing the station and partner configuration, we can try sending a message. First, note that there are multiple mailboxes called Inbox, Sent, Outbox and Failed. When messages are composed and sent, they are first placed into the Outbox where they are queued for transmission. If the transmission fails and automatic retries are exhausted, they are placed into the Failed mailbox. Such messages maybe manually retried from the Failed mailbox. Incomg messages are placed into the Inbox. To compose message, click the Compose Message button on the Messages view.

Messages View
Messages View

You will be shown a view as follows. Let’s compose an AS2 message.

  1. Select the partner you want to send a message to. If you only have one partner, it will come selected by default.
  2. Select the station you want to send messages from. Again, if you only have one station, it will come selected by default.
  3. Optionally, specify a message subject. If you keep this empty, the default subject set in partner configuration will be used.
  4. Select the files to be sent. You can either drag and drop them to the dropzone or you can browse and select the files.
  5. Optionally, you can select a submission profile, where certain HTTP headers etc. can be automatically added. This is helpful for regulatory submissions to the FDA.
  6. Submit the message to the queue by clicking the Send button.
Compose Message
Compose Message

Content-Type / MIME-type

AS2G will auto-detect and assign Content-Type headers to submitted files, based on file extension and/or content.

Alternatively if you are submitting files through the REST API or AWS S3, you can explicitly specify a content type with the submission/upload itself to override the auto-detection.

Message lifecycle

When you submit, the message will be added to a queue, and you will be redirected to the Outbox view. From there, you can check on the status of the message.

Queued messages view
Queued messages view
  • If the queued message is delivered successfully to the recipient, the message will move to the Sent mailbox. However, if the delivery encounters any errors, the message will be retried automatically 10 times, and the current state of the retries appear on the Outbox view.
Sent messages view
Sent messages view
  • After 10 failed attempts, the message will be moved to the Failed mailbox view. In this case, you can click the message entry in the failures list, and check the Failure Reason field to find the cause. Once you fix the issue, click the Retry button on the failed entry to re-queue it for delivery.

Failure Log

The Failure Log lists detailed information about all failures encountered and the time of occurrence. For a message which fails retries, each such attempt and its results can be seen as shown below.

Failure Log view
Failure Log view

Received Messages

Messages received from Partners will appear in the Inbox as shown below, and the status of the MDN is also indicated. Clicking the Download attachments button will download a Zip file containing the file/s of the message.

Inbox view
Inbox view

Timeline View

The Timeline view will show a complete history of sent and received messages, including failures and retries as follows.

Timeline view
Timeline view