• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Issue Mail Account XML API: mailbox - This element is not expected

pmg

Basic Pleskian
Server operating system version
Linux
Plesk version and microupdate number
Plesk Obsidian 18.0.71 Update #2
Having issue creating email accounts with mailbox enabled.
Request:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<packet>
    <mail>
        <create>
            <filter>
                <site-id>248</site-id>
                <mailname>
                    <name>info1</name>
                    <password>
                        <value>redacted</value>
                        <type>plain</type>
                    </password>
                    <mailbox>
                        <enabled>true</enabled>
                        <quota>1024000</quota>
                    </mailbox>
                </mailname>
            </filter>
        </create>
    </mail>
</packet>

Response:
XML:
<?xml version="1.0"?>
<packet version="1.6.9.1">
    <system>
        <status>error</status>
        <errcode>1014</errcode>
        <errtext>Parser error: Request is invalid. Error in line 14: Element &#039;mailbox&#039;:
            This element is not expected. Expected is one of ( antivir,
            outgoing-messages-mbox-limit, description ).</errtext>
    </system>
</packet>

Using docs/examples from Creating Mail Accounts
 
Try switching the order of the <mailbox> element with the <password> element (i.e having the <password> element last within the <mailname> element). The order should not matter, but it seems it does :(
 
Hey @Kaspar , thanks for the quick response!
This might explain some other hickups I've faced with XML API. Will keep in mind that order sometimes matter.
Right now I've worked around this using <update> packet to enable mailbox post email creation.
 
Back
Top