|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Functions | |
| const char * | X400mtError (int error) |
| Return string for error code. | |
| int | X400mtOpen (const char *credentials, struct X400mtSession **spp) |
| Open a session to the MTA. | |
| int | X400mtClose (struct X400mtSession *sp) |
| Close a X400 Session. | |
| int | X400mtSetIntDefault (struct X400mtSession *sp, int paramtype, int value) |
| Set a default integer parameter value in a session. | |
| int | X400mtSetStrDefault (struct X400mtSession *sp, int paramtype, const char *value, size_t length) |
| Set a default string parameter value in a session. | |
| int | X400mtMsgNew (struct X400mtSession *sp, int type, struct X400mtMessage **mpp) |
| Creates new message. | |
| int | X400mtMsgCountRecip (struct X400mtMessage *mp, int type, int *cp) |
| Returns count of addresses of given type in message object. | |
| int | X400mtMsgSend (struct X400mtMessage *mp) |
| Send message object to MTA. | |
| int | X400mtMsgDelete (struct X400mtMessage *mp) |
| Delete message object. | |
| int | X400mtMsgAddStrParam (struct X400mtMessage *mp, int paramtype, const char *value, size_t length) |
| Add string-valued parameter to the message. | |
| int | X400mtMsgAddIntParam (struct X400mtMessage *mp, int paramtype, int value) |
| Add integer-valued parameter to the message. | |
| int | X400mtMsgAddAttachment (struct X400mtMessage *mp, int type, const char *string, size_t length) |
| Add an attachment to the message. | |
| int | X400mtMsgAddBodypart (struct X400mtMessage *mp, struct X400Bodypart *bp) |
| Add a body part object to a message. | |
| int | X400mtMsgAddMessageBody (struct X400mtMessage *mp, struct X400Message *mbp) |
| int | X400mtMsgAddMessageBodyWType (struct X400mtMessage *mp, struct X400Message *mbp, int type) |
| Add a message body part object to a message. | |
| int | X400mtRecipNew (struct X400mtMessage *mp, int type, struct X400Recipient **rpp) |
| Add new recipient to a message. | |
| int | X400mtRecipAddStrParam (struct X400Recipient *rp, int paramtype, const char *value, size_t length) |
| Add string-valued parameter to the message. | |
| int | X400mtRecipAddIntParam (struct X400Recipient *rp, int paramtype, int value) |
| Add integer-valued parameter to the message. | |
| int | X400mtWait (struct X400mtSession *sp, int seconds, int *count) |
| Wait for messages to be transferred out. | |
| int | X400mtMsgGet (struct X400mtSession *sp, struct X400mtMessage **mpp, int *typep) |
| Transfer message object out from MTA completely. | |
| int | X400mtMsgGetStart (struct X400mtSession *sp, struct X400mtMessage **mpp, int *typep) |
| Get message object for transfer out from MTA. | |
| int | X400mtMsgGetFinish (struct X400mtMessage *mp, int status, int reason, int diag, char *info) |
| Finish transfer-out of message from MTA, generate DR if required. | |
| int | X400mtMsgGetStrParam (struct X400mtMessage *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp) |
| Return a string-valued parameter from the message object. | |
| int | X400mtMsgGetIntParam (struct X400mtMessage *mp, int paramtype, int *valp) |
| Return a integer-valued parameter from the message object. | |
| int | X400mtMsgGetAttachment (struct X400mtMessage *mp, int number, int *typep, char *buffer, size_t buflen, size_t *lengthp) |
| Return a integer-valued parameter from the message object. | |
| int | X400mtMsgGetBodypart (struct X400mtMessage *mp, int number, int *typep, struct X400Bodypart **bpp) |
| Return a pointer to a body part object. | |
| int | X400mtMsgGetMessageBody (struct X400mtMessage *mp, int number, struct X400Message **mpp) |
| Return a pointer to a body part object. | |
| int | X400mtRecipGet (struct X400mtMessage *mp, int type, int number, struct X400Recipient **rpp) |
| Get recipient object from message. | |
| int | X400mtRecipGetStrParam (struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp) |
| Return a string-valued parameter from the recipient object. | |
| int | X400mtRecipGetIntParam (struct X400Recipient *rp, int paramtype, int *valp) |
| Return a integer-valued parameter from the recipient object. | |
| int | X400mtDLExpHistGet (struct X400mtMessage *mp, int entry, struct X400DLExpHist **hist) |
| Create a new DL Expansion History object from the message object. | |
| int | X400mtDLExpHistNew (struct X400mtMessage *mp, struct X400DLExpHist **histp) |
| Create a new DL Expansion History object, and associate it with the existing message. | |
| int | X400mtTraceInfoGet (struct X400mtMessage *mp, int entry, struct X400TraceInfo **info, int type) |
| Get a Trace Info object for a message object. | |
| int | X400mtTraceInfoNew (struct X400mtMessage *mp, struct X400TraceInfo **info, int type) |
| Create a new Trace Info object for a message object. | |
| int | X400mtInternalTraceInfoGet (struct X400mtMessage *mp, int entry, struct X400InternalTraceInfo **info) |
| Get an Internal Trace Info object for a message object. | |
| int | X400mtInternalTraceInfoNew (struct X400mtMessage *mp, struct X400InternalTraceInfo **info) |
| Create a new Internal Trace Info object for a message object. | |
| int | X400mtALINew (struct X400mtMessage *mp, struct X400ALI **ali) |
| Create a new Address List Indicator object for a message object. | |
| int | X400mtALIGet (struct X400mtMessage *mp, int entry, struct X400ALI **ali) |
| Get a new Address List Indicator object for a message object. | |
| int | X400mtPSSNew (struct X400mtMessage *mp, int type, struct X400PSS **pss) |
| Create a new Printable String Syntax object for a message object. | |
| int | X400mtPSSGet (struct X400mtMessage *mp, int type, int entry, struct X400PSS **pss) |
| Get a new Printable String Syntax object for a message object. | |
| int | X400mtDistFieldNew (struct X400mtMessage *mp, struct X400DistField **distfield) |
| Create a new P772 Distribution Field object for a message object. | |
| int | X400mtDistFieldGet (struct X400mtMessage *mp, int entry, struct X400DistField **distfield) |
| Get a new P772 Distribution Field object for a message object. | |
| int | X400mtOtherRecipNew (struct X400mtMessage *mp, struct X400OtherRecip **otherrecip) |
| Create a new P772 Other Recipient object for a message object. | |
| int | X400mtOtherRecipGet (struct X400mtMessage *mp, int entry, struct X400OtherRecip **otherrecip) |
| Get a new P772 Other Recipient object for a message object. | |
| int | X400mtRediHistGetEnv (struct X400mtMessage *msg, int entry, struct X400RediHist **hist) |
| Get the Redirection History object from a message envelope this is represented by 8.3.1.2.1.5 in X.411. | |
| int | X400mtRediHistNewEnv (struct X400mtMessage *msg, struct X400RediHist **hist) |
| Create a new Redirection History object for a message envelope this is represented by 8.3.1.2.1.5 in X.411. | |
| int | X400mtORandDLNew (struct X400mtMessage *msg, struct X400ORandDL **or_and_dl) |
| Create new Originator and DL expansion history object. | |
| int | X400mtORandDLGet (struct X400mtMessage *msg, int entry, struct X400ORandDL **or_and_dl) |
| Get Originator and DL expansion history object. | |
| const char* X400mtError | ( | int | error | ) |
Return string for error code.
| error | [in] error code |
| int X400mtOpen | ( | const char * | credentials, | |
| struct X400mtSession ** | spp | |||
| ) |
Open a session to the MTA.
| credentials | [in] String for the credentials for the session | |
| spp | [out] Pointer to receive pointer to opaque session data |
| int X400mtClose | ( | struct X400mtSession * | sp | ) |
Close a X400 Session.
| sp | [in] Pointer to session data |
| int X400mtSetIntDefault | ( | struct X400mtSession * | sp, | |
| int | paramtype, | |||
| int | value | |||
| ) |
Set a default integer parameter value in a session.
| sp | [in] Session handle returned from an X400mtOpen call | |
| paramtype | [in] Parameter type to set | |
| value | [in] Parameter value to set |
| int X400mtSetStrDefault | ( | struct X400mtSession * | sp, | |
| int | paramtype, | |||
| const char * | value, | |||
| size_t | length | |||
| ) |
Set a default string parameter value in a session.
| sp | [in] Session handle returned from an X400mtOpen call | |
| paramtype | [in] Parameter type to set | |
| value | [in] Parameter value to set | |
| length | [in] Length of parameter value to set |
| int X400mtMsgNew | ( | struct X400mtSession * | sp, | |
| int | type, | |||
| struct X400mtMessage ** | mpp | |||
| ) |
Creates new message.
| sp | [in] X400 session pointer | |
| type | [in] Type of message object | |
| mpp | [out] pointer to receive pointer to message object |
| int X400mtMsgCountRecip | ( | struct X400mtMessage * | mp, | |
| int | type, | |||
| int * | cp | |||
| ) |
Returns count of addresses of given type in message object.
| mp | [in] X400 MT message | |
| type | [in] Type of address to count | |
| cp | [out] pointer integer to receive count of addresses |
| int X400mtMsgSend | ( | struct X400mtMessage * | mp | ) |
Send message object to MTA.
| mp | [in] Message pointer |
| int X400mtMsgDelete | ( | struct X400mtMessage * | mp | ) |
Delete message object.
| mp | [in] Message pointer |
| int X400mtMsgAddStrParam | ( | struct X400mtMessage * | mp, | |
| int | paramtype, | |||
| const char * | value, | |||
| size_t | length | |||
| ) |
Add string-valued parameter to the message.
| mp | [in] Message pointer | |
| paramtype | [in] Type of parameter | |
| value | [in] Value of parameter | |
| length | [in] Length of parameter, -1 if NUL terminated |
| int X400mtMsgAddIntParam | ( | struct X400mtMessage * | mp, | |
| int | paramtype, | |||
| int | value | |||
| ) |
Add integer-valued parameter to the message.
| mp | [in] Message pointer | |
| paramtype | [in] Type of parameter | |
| value | [in] Value of parameter |
| int X400mtMsgAddAttachment | ( | struct X400mtMessage * | mp, | |
| int | type, | |||
| const char * | string, | |||
| size_t | length | |||
| ) |
Add an attachment to the message.
| mp | [in] Message pointer | |
| type | [in] Type of attachment | |
| string | [in] String value for attachment | |
| length | [in] Length of string |
| int X400mtMsgAddBodypart | ( | struct X400mtMessage * | mp, | |
| struct X400Bodypart * | bp | |||
| ) |
Add a body part object to a message.
| mp | [in] Message pointer | |
| bp | [in] Bodypart pointer |
| int X400mtMsgAddMessageBody | ( | struct X400mtMessage * | mp, | |
| struct X400Message * | mbp | |||
| ) |
| int X400mtMsgAddMessageBodyWType | ( | struct X400mtMessage * | mp, | |
| struct X400Message * | mbp, | |||
| int | type | |||
| ) |
Add a message body part object to a message.
| mp | [in] Message pointer | |
| mbp | [in] Message body part pointer | |
| type | [in] BodyPart type (E.G X400_T_MESSAGE) |
If the message object being created has an IPN content, then any envelope information is ignored.
| int X400mtRecipNew | ( | struct X400mtMessage * | mp, | |
| int | type, | |||
| struct X400Recipient ** | rpp | |||
| ) |
Add new recipient to a message.
| mp | [in] Message pointer | |
| type | [in] type of recipient | |
| rpp | [out] Pointer to place for pointer to recipient information |
To set a given recipient in both envelope and header, add together the values, e.g. X400_RECIP_PRIMARY + X400_RECIP_ENVELOPE. The value X400_RECIP_STANDARD is a shorthand for this combination.
| int X400mtRecipAddStrParam | ( | struct X400Recipient * | rp, | |
| int | paramtype, | |||
| const char * | value, | |||
| size_t | length | |||
| ) |
Add string-valued parameter to the message.
| rp | [in] Recipient pointer | |
| paramtype | [in] Type of parameter | |
| value | [in] Value of parameter | |
| length | [in] Length of parameter, -1 if NUL terminated |
| int X400mtRecipAddIntParam | ( | struct X400Recipient * | rp, | |
| int | paramtype, | |||
| int | value | |||
| ) |
Add integer-valued parameter to the message.
| rp | [in] Message pointer | |
| paramtype | [in] Type of parameter | |
| value | [in] Value of parameter |
| int X400mtWait | ( | struct X400mtSession * | sp, | |
| int | seconds, | |||
| int * | count | |||
| ) |
Wait for messages to be transferred out.
| sp | [in] Session pointer | |
| seconds | [in] Seconds to wait | |
| count | [out] pointer to receive number of messages |
| int X400mtMsgGet | ( | struct X400mtSession * | sp, | |
| struct X400mtMessage ** | mpp, | |||
| int * | typep | |||
| ) |
Transfer message object out from MTA completely.
| sp | [in] Session pointer | |
| mpp | [out] Pointer to receive message object pointer | |
| typep | [out] Pointer to receive message object type. |
| int X400mtMsgGetStart | ( | struct X400mtSession * | sp, | |
| struct X400mtMessage ** | mpp, | |||
| int * | typep | |||
| ) |
Get message object for transfer out from MTA.
| sp | [in] Session pointer | |
| mpp | [out] Pointer to receive message object pointer | |
| typep | [out] Pointer to receive message object type. |
| int X400mtMsgGetFinish | ( | struct X400mtMessage * | mp, | |
| int | status, | |||
| int | reason, | |||
| int | diag, | |||
| char * | info | |||
| ) |
Finish transfer-out of message from MTA, generate DR if required.
| mp | [in] Message pointer | |
| status | [in] Status from gateway message handling. | |
| reason | [in] DR reason code. See standards for values | |
| diag | [in] DR diagnostic code. See standards for values | |
| info | [in] DR supplementary info. |
If the 'x400_reports' key of the x400tailor file is set to "1" and "status" is specified as X400_E_NOERROR, a positive delivery report will be generated. If an error status is passed in, the DR reason and diagnostic codes and supplementary information will be used to generate a DR.
Under normal circumstances, gateway applications should generate their own delivery reports, and not rely on the ones generated by this function, as for example, when there's more than one recipient in the message, it cannot set a different status for each recipient.
| int X400mtMsgGetStrParam | ( | struct X400mtMessage * | mp, | |
| int | paramtype, | |||
| char * | buffer, | |||
| size_t | buflen, | |||
| size_t * | paramlenp | |||
| ) |
Return a string-valued parameter from the message object.
| mp | [in] message object pointer | |
| paramtype | [in] type of parameter | |
| buffer | [in/out] address for result | |
| buflen | [in] length of buffer provided | |
| paramlenp | [out] Pointer to receive actual length |
| int X400mtMsgGetIntParam | ( | struct X400mtMessage * | mp, | |
| int | paramtype, | |||
| int * | valp | |||
| ) |
Return a integer-valued parameter from the message object.
| mp | [in] message object pointer | |
| paramtype | [in] type of parameter | |
| valp | [out] Pointer to receive value |
| int X400mtMsgGetAttachment | ( | struct X400mtMessage * | mp, | |
| int | number, | |||
| int * | typep, | |||
| char * | buffer, | |||
| size_t | buflen, | |||
| size_t * | lengthp | |||
| ) |
Return a integer-valued parameter from the message object.
| mp | [in] message object pointer | |
| number | [in] Attachment number | |
| typep | [out] Pointer to receive attachment type | |
| buffer | [in] Buffer to receive data | |
| buflen | [in] Length of buffer | |
| lengthp | [out] Length of string |
| int X400mtMsgGetBodypart | ( | struct X400mtMessage * | mp, | |
| int | number, | |||
| int * | typep, | |||
| struct X400Bodypart ** | bpp | |||
| ) |
Return a pointer to a body part object.
int number, int *typep, struct X400Bodypart **bpp)
| mp | [in] message object pointer | |
| number | [in] Bodypart number | |
| typep | [out] Pointer to receive attachment type | |
| bpp | [out] Pointer to pointer to object |
| int X400mtMsgGetMessageBody | ( | struct X400mtMessage * | mp, | |
| int | number, | |||
| struct X400Message ** | mpp | |||
| ) |
Return a pointer to a body part object.
| mp | [in] message object pointer | |
| number | [in] Bodypart number | |
| mpp | [out] Pointer to pointer to object |
| int X400mtRecipGet | ( | struct X400mtMessage * | mp, | |
| int | type, | |||
| int | number, | |||
| struct X400Recipient ** | rpp | |||
| ) |
Get recipient object from message.
| mp | [in] Message object pointer | |
| type | [in] Type of recipient | |
| number | [in] Ordinal number of recipient | |
| rpp | [out] Pointer to receive recipient object pointer |
| int X400mtRecipGetStrParam | ( | struct X400Recipient * | rp, | |
| int | paramtype, | |||
| char * | buffer, | |||
| size_t | buflen, | |||
| size_t * | paramlenp | |||
| ) |
Return a string-valued parameter from the recipient object.
| rp | [in] recipient object pointer | |
| paramtype | [in] type of parameter | |
| buffer | [in/out] address for result | |
| buflen | [in] length of buffer provided | |
| paramlenp | [out] Pointer to receive actual length |
| int X400mtRecipGetIntParam | ( | struct X400Recipient * | rp, | |
| int | paramtype, | |||
| int * | valp | |||
| ) |
Return a integer-valued parameter from the recipient object.
| rp | [in] recipient object pointer | |
| paramtype | [in] type of parameter | |
| valp | [out] Pointer to receive value |
| int X400mtDLExpHistGet | ( | struct X400mtMessage * | mp, | |
| int | entry, | |||
| struct X400DLExpHist ** | hist | |||
| ) |
Create a new DL Expansion History object from the message object.
| mp | [in] message object pointer | |
| entry | [in] DL expansion history element to fetch | |
| hist | [out] pointer to receive new DL Expansion History object |
| int X400mtDLExpHistNew | ( | struct X400mtMessage * | mp, | |
| struct X400DLExpHist ** | histp | |||
| ) |
Create a new DL Expansion History object, and associate it with the existing message.
| mp | [in] message pointer | |
| histp | [out] pointer to receive new DL Expansion History object |
| int X400mtTraceInfoGet | ( | struct X400mtMessage * | mp, | |
| int | entry, | |||
| struct X400TraceInfo ** | info, | |||
| int | type | |||
| ) |
Get a Trace Info object for a message object.
| mp | [in] message pointer | |
| entry | [in] Trace Info object to use | |
| info | [out] pointer to receive new trace infomation object | |
| type | [in] type of trace info object to get |
| int X400mtTraceInfoNew | ( | struct X400mtMessage * | mp, | |
| struct X400TraceInfo ** | info, | |||
| int | type | |||
| ) |
Create a new Trace Info object for a message object.
| mp | [in] message pointer | |
| info | [out] pointer to receive new trace infomation object | |
| type | [in] type of trace info object to create |
| int X400mtInternalTraceInfoGet | ( | struct X400mtMessage * | mp, | |
| int | entry, | |||
| struct X400InternalTraceInfo ** | info | |||
| ) |
Get an Internal Trace Info object for a message object.
| mp | [in] message pointer | |
| entry | [in] Trace Info object to use | |
| info | [out] pointer to receive new trace infomation object |
| int X400mtInternalTraceInfoNew | ( | struct X400mtMessage * | mp, | |
| struct X400InternalTraceInfo ** | info | |||
| ) |
Create a new Internal Trace Info object for a message object.
| mp | [in] message pointer | |
| info | [out] pointer to receive new trace infomation object |
| int X400mtALINew | ( | struct X400mtMessage * | mp, | |
| struct X400ALI ** | ali | |||
| ) |
Create a new Address List Indicator object for a message object.
| mp | [in] message pointer | |
| ali | [out] pointer to receive ALI object |
| int X400mtALIGet | ( | struct X400mtMessage * | mp, | |
| int | entry, | |||
| struct X400ALI ** | ali | |||
| ) |
Get a new Address List Indicator object for a message object.
| mp | [in] message pointer | |
| entry | [in] ALI object being used. | |
| ali | [out] pointer to receive new ALI object |
| int X400mtPSSNew | ( | struct X400mtMessage * | mp, | |
| int | type, | |||
| struct X400PSS ** | pss | |||
| ) |
Create a new Printable String Syntax object for a message object.
| mp | [in] message pointer | |
| type | [in] type of PSS being used. | |
| pss | [out] pointer to receive pss object |
| int X400mtPSSGet | ( | struct X400mtMessage * | mp, | |
| int | type, | |||
| int | entry, | |||
| struct X400PSS ** | pss | |||
| ) |
Get a new Printable String Syntax object for a message object.
| mp | [in] message pointer | |
| type | [in] type of PSS being used. | |
| entry | [in] PSS object being used. | |
| pss | [out] pointer to receive new PSS object |
| int X400mtDistFieldNew | ( | struct X400mtMessage * | mp, | |
| struct X400DistField ** | distfield | |||
| ) |
Create a new P772 Distribution Field object for a message object.
| mp | [in] message pointer | |
| distfield | [out] pointer to receive distfield object |
| int X400mtDistFieldGet | ( | struct X400mtMessage * | mp, | |
| int | entry, | |||
| struct X400DistField ** | distfield | |||
| ) |
Get a new P772 Distribution Field object for a message object.
| mp | [in] message pointer | |
| entry | [in] distfield object being used. | |
| distfield | [out] pointer to receive new PSS object |
| int X400mtOtherRecipNew | ( | struct X400mtMessage * | mp, | |
| struct X400OtherRecip ** | otherrecip | |||
| ) |
Create a new P772 Other Recipient object for a message object.
| mp | [in] message pointer | |
| otherrecip | [out] pointer to receive other recipient object |
| int X400mtOtherRecipGet | ( | struct X400mtMessage * | mp, | |
| int | entry, | |||
| struct X400OtherRecip ** | otherrecip | |||
| ) |
Get a new P772 Other Recipient object for a message object.
| mp | [in] message pointer | |
| entry | [in] Other Recip object being used. | |
| otherrecip | [out] pointer to receive new other recipient object |
| int X400mtRediHistGetEnv | ( | struct X400mtMessage * | msg, | |
| int | entry, | |||
| struct X400RediHist ** | hist | |||
| ) |
Get the Redirection History object from a message envelope this is represented by 8.3.1.2.1.5 in X.411.
| msg | [in] X.400 Message | |
| entry | [in] Redirection history object to use | |
| hist | [out] Pointer to redirection history object |
| int X400mtRediHistNewEnv | ( | struct X400mtMessage * | msg, | |
| struct X400RediHist ** | hist | |||
| ) |
Create a new Redirection History object for a message envelope this is represented by 8.3.1.2.1.5 in X.411.
| msg | [in] X.400 Redirection history | |
| hist | [out] Pointer to redirection history object |
| int X400mtORandDLNew | ( | struct X400mtMessage * | msg, | |
| struct X400ORandDL ** | or_and_dl | |||
| ) |
Create new Originator and DL expansion history object.
| msg | [in] X.400 Originator and DL expansion history object | |
| or_and_dl | [out] Pointer to Originator and DL expansion history object |
| int X400mtORandDLGet | ( | struct X400mtMessage * | msg, | |
| int | entry, | |||
| struct X400ORandDL ** | or_and_dl | |||
| ) |
Get Originator and DL expansion history object.
| msg | [in] X.400 Message | |
| entry | [in] The orginator and dl expansion history object to use | |
| or_and_dl | [out] Pointer to orig ans dl expan history object |