Isode Messaging APIs
Summary: This page describes how to use the Isode X.400 API to retrieve and submit messages using P7 into or out of a Message Store, or P3 directly into or out of an MTA.Content
X.400 Gateway Tcl API examples
Application Features
These examples provided show how to do the following using the Tcl API
- x400_mt_send_message.tcl: Submit X.400 messages
- x400_mt_send_neg_dr.tcl: Submit negative delivery reports
- x400_mt_send_pos_dr.tcl: Submit positive delivery reports
- x400_mt_rcv_message.tcl: Retrieve X.400 messages
- x400_mt_rcv_message.tcl: Retrieve delivery reports
Messaging Configuration
Create an MTA using Mconsole and the wizards. You will need to create an External MTA to act as the Gateway, and a Gateway channel which you application will use as which to Bind to the MTA.
You will need to register the O/R address space of message recipients to be transfered into the Gateway using a Routing Tree node which points at the External Gateway.
Configuring the Applications
You can set the default values in the session object in the same way as the C API. For example:
$c priority 94 $m original_encoded_information_types ia5-text
Messages are put in the x400mt channel when recipients for the Gateway O/R address space are routed. Messages are transferred from the x400mt of the MTA by a Gateway client binding as a passive channel. Messages are transferred from the Gateway to the MTA similarly.
These examples show how to submit X.400 messages, delivery reports and IPNs using the MHS Tcl API
In order to use them, you have to configure at least the variables found at the beginning of the scripts (between Start configuration and End configuration).
Some of the values set are optional, but appear in the example to show you how they are set.
Transfer via the MTA's gateway channel
Run the example Tcl scripts (x400_mt_send_message.tcL, x400_mt_rcv_message.tcl, x400_mt_send_pos_dr.tcl, x400_mt_send_neg_dr.tcl) under a user that has authorization to run MTA programs (i.e. root or pp under Unix, or Administrator under Windows).
Correlation of messages, delivery reports and IPNs
When a message is submitted via the Message Store API the MTA assigns it a message identifier. This value is then returned by the API in the message_identifier attribute of the message object.
When a report is generated by the destination MTA, the value of the original message identifier is set in the subject_identifier of the delivery report, allowing you to correlate the original message with the report.
When the recipient's X.400 user agent reads the message, an IPN should be created, with the message_identifier field set to the message_identifier of the original message. Please note that the Tcl API example x400_ms_rcv_message.tcl does not generate an IPN when it reads a message.
When a message is transfered-in via the MT API, the message identifier is set by the API user.
When a report is generated by the MT API user, the value of the original message identifier has to be set in the subject_identifier of the delivery report, allowing the recipient to correlate the original message with the report.