TclMML

[mml map mailing_list]

Documentation: Map Mailing Lists Fields

[ Home | Docs | FAQ | Download | CVS | Mailing Lists | Bug Tracker | USPS's MOL Site ]

Syntax

mml map mailing_list ?-switches? mailing_list_id field_mappings

Switches

-debug filename (Optional)

If specified, the XML generated and sent to the MOL system, as well as the XML reply from the MOL system, will be appended to filename.

Positional Arguments

mailing_list_id

This is an opaque identifier returned by the MOL processor, first when the mailing list is uploaded (see upload mailing_list), and subsequently via list mailing_lists.

field_mappings

$field_mappings should contain a list of key/value pairs, as in the format returned by the Tcl [array get] command, where the key is the name of the MOL/MML element being mapped to, and value is the name of the column in your mailing list.

Here is a list of MOL/MML address elements you can map your maililing list to:

  • title
  • prefix
  • fullname
  • firstname
  • middlename
  • lastname
  • suffix
  • company
  • addressline1
  • addressline2
  • urbancode
  • city
  • state
  • country
  • postcode

At a minimum, if you provide a mapping, you should map either fullname or firstname & lastname along with addressline1, city, state and postcode.

Your mailing list can have additional columns that are not mapped to MOL/MML fields (such as those that you'll use in mail-merge documents).

Return Value

Upon succesful mapping nothing is returned.

An error will be returned if the mailing list mapping was not succesful. Possible causes under which an error could be raised include: transient network outages, MOL processor internal errors, specifying a mailing_list_id that does not exist, specifying mapping to fields that are not defined in MML, specifying mapping from fields that do not exist in the mailing list file, etc.