Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

Description

This routine parses a list of one or more comma separated RFC 822 addresses. The input list can be of any arbitrary length. The result of the parse is represented by an address context and a count of the parsed addresses. Each parsed address can then be individually extracted from the parsed list with a call to mtaAddresGetN(). The address context should be disposed of with a call to mtaAddressFinish(). When there are no valid addresses in the input line, the returned context will be NULL and the count zero.


Note –

There are two item codes that can be used in the item_code argument. A NULL value can be passed for either or both of the adr_ctx and address_count arguments. When NULL is passed for both, all that is learned by calling the routine is whether or not the address list is syntactically valid.


The following table lists the item codes for this routine, their additional required arguments, and gives a description of each.

Item Codes  

Additional Arguments  

Description  

MTA_DOMAIN

const char *domain

size_t domain_len

Specify a domain name to append to short-form addresses, such as sue, in order to create a fully qualified address, for example, sue@siroe.com.

It must be followed by two additional call arguments: the domain name to use and the length in bytes of that domain name. If a value of 0 is passed for the length, then the domain name must be NULL terminated.

MTA_ITEM_LIST

mta_item_list_t *item_list

Specify a pointer to an item list array. The array must be terminated with a final array entry with an item code value of 0. For further information on item lists, see Item Codes and Item Lists.