Adding Mailing List
Use the add-list operation to add a new mailing list.
Request Packet Structure
A request XML packet adding a mailing list to Plesk database includes the add-list operation node:
The add-list node is presented by the MaillistAddListInputType type (
maillist.xsd), and its graphical representation is as follows:
- The site-id node is required. It specifies the site ID in Plesk database. Data type: integer.
- The name node is required. It specifies the name of the mailing list. Data type: string.
- The password node is required. It specifies the mailing list administrator's password. Data type: string.
- The admin-email node is required. It specifies the mailing list administrator's e-mail address. All information on the mailing list management is sent to this e-mail address. Data type: string.
- The notify node is optional. Specifies if a notification of the mailing list creation will be sent to the administrator. Data type: boolean.
You can add multiple mailing lists in a single packet. Add as many add-list operations as the number of mailing lists to be added.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The add-list node of the output XML packet is presented by type MaillistAddOutputType (
maillist.xsd) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: ResultType (
- The status node is required. It specifies the execution status of the add-list operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the add-list operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the add-list operation fails. Data type: string.
- The id node is optional. It returns the mailing list ID in Plesk database if the operation succeeds. Data type: integer.
Adding a single mailing list
This request packet adds mailing list MyMailer to the site specified by ID 45.
If the Mailman software is not installed on the server, the response looks as follows:
Adding multiple mailing lists
This request packet adds mailing lists MyMailer and SubscribeMe to the site specified by ID 45.