Getting Mail Account Settings

Plesk Administrator can get settings of any mail account registered on any site. Plesk customers are allowed to get settings of mail accounts registered on their own sites only. The settings are as follows:

Use the get_info operation to retrieve site settings.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet getting a collection of mail account settings should include the get_info operation node:

<packet>
 <mail>
  <get_info>
   ...
  </get_info>
 </mail>
</packet>

 

The get_info node does not have a separate type, it is nested within the MailTypeRequest complex type (mail_input.xsd). The get_info node has the following graphics representation:

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The get_info node of the response packet is structured as follows:

 

Samples

To request information on mail accounts looks as follows:

<packet version="1.6.3.0">
<mail>
<get_info>
   <filter>
      <site-id>1</site-id>
   </filter>
   <mailbox/>
</get_info>
</mail>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.0">
  <mail>
    <get_info>
      <result>
        <status>ok</status>
        <mailname>
          <id>1</id>
          <name>admin</name>
          <mailbox>
            <enabled>true</enabled>
            <quota>-1</quota>
          </mailbox>
          <password/>
          <antivir>off</antivir>
        </mailname>
      </result>
      <result>
        <status>ok</status>
        <mailname>
          <id>2</id>
          <name>techdept</name>
          <mailbox>
            <enabled>true</enabled>
            <quota>1024000</quota>
          </mailbox>
          <password/>
          <antivir>inout</antivir>
        </mailname>
      </result>
      <result>
        <status>ok</status>
        <mailname>
          <id>3</id>
          <name>techdept1</name>
          <mailbox>
            <enabled>false</enabled>
            <quota>-1</quota>
          </mailbox>
          <password/>
          <antivir>off</antivir>
        </mailname>
      </result>
      <result>
        <status>ok</status>
        <mailname>
          <id>4</id>
          <name>admin1</name>
          <mailbox>
            <enabled>false</enabled>
            <quota>-1</quota>
          </mailbox>
          <password/>
          <antivir>inout</antivir>
        </mailname>
      </result>
      <result>
        <status>ok</status>
        <mailname>
          <id>5</id>
          <name>techdept11</name>
          <mailbox>
            <enabled>false</enabled>
            <quota>-1</quota>
          </mailbox>
          <password/>
          <antivir>off</antivir>
        </mailname>
      </result>
      <result>
        <status>ok</status>
        <mailname>
          <id>6</id>
          <name>admin11</name>
          <mailbox>
            <enabled>false</enabled>
            <quota>-1</quota>
          </mailbox>
          <password/>
          <antivir>inout</antivir>
        </mailname>
      </result>
    </get_info>
  </mail>
</packet>