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


The following is a code fragment that parses and displays the individual addresses from a list of two addresses, using mtaAddressGetN():

ires = mtaAddressParse(&adr_ctx, &adr_count,
        "Judy Public <\>,",
        0, 0);
for (i = 0; i < adr_count; i++)
    mtaAddressGetN(adr_ctx, i, &ptr, NULL,
                    MTA_ADDR_LOCAL | MTA_ADDR_DOMAIN);
    printf("Address %d: %s\n", i, ptr);