<?xml version="1.0"?>
<clientConfig version="1.1">
    <emailProvider id="qm.ipablapieve.it">
      <domain>qm.ipablapieve.it</domain>

      <displayName>IPAB La Pieve QM</displayName>
      <displayShortName>LaPieve</displayShortName>

      <!-- type=
           "imap": IMAP
           "pop3": POP3
           -->
      <incomingServer type="imap">
         <hostname>imap.qboxmail.com</hostname>
         <port>993</port>
         <socketType>SSL</socketType>
         <username>%EMAILADDRESS%</username>
         <authentication>password-cleartext</authentication>
      </incomingServer>

      <outgoingServer type="smtp">
         <hostname>smtp.qboxmail.com</hostname>
         <port>587</port>
         <socketType>STARTTLS</socketType> <!-- see <incomingServer> -->
         <username>%EMAILADDRESS%</username> <!-- if smtp-auth -->
         <authentication>password-cleartext</authentication>
         <useGlobalPreferredServer>true</useGlobalPreferredServer>
      </outgoingServer>

    </emailProvider>

    <!-- This allows to access the webmail service of the provider.
         The URLs are loaded into a standard webbrowser for the user.
         Specifying this is optional. -->
    <webMail>
      <!-- Webpage where the user has to log in manually by entering username
           and password himself.
           HTTPS required. -->
      <loginPage url="https://webmail.qboxmail.com/login/" />

      <!-- Same as loginAutomaticDOM, but the website makes checks that
           the user comes from the login page. So, open the login page
           in the browser, get the page's DOM, fill out name and password
           fields for the user, and trigger the login button.
           The login button might not be an HTML button, just a div, so
           to trigger it, send a click event to it.
           HTTPS is required for the URL. -->
      <loginPageInfo url="https://webmail.qboxmail.com/login/">
        <!-- What to fill into the usernameField.
             Format is the same as for <username> within <incomingServer>,
             including placeholders. See below for valid placeholders. -->
        <username>%EMAILADDRESS%</username>
        <!-- Allows to find the textfield on the page, to fill it out.
             The id attribute give the DOM ID,
             The name attribute give the DOM name attribute.
             One or both of id and name attributes must exist.
             Try the ID first (e.g. using getElementById()), if existing.
             Otherwise, try finding the element by name.
             Don't treat the IDs given in this XML file as trusted,
             but before using them, verify the format
             (e.g. only characters and digits for IDs).
             If you use powerful functions like jQuery, and the XML returns
             you code in the username ID, and you feed it unchecked to jQuery,
             it may be executed. -->
        <usernameField id="email_field" name="email" />
        <passwordField name="password" />
        <!-- The submit button to trigger the server submit
             after filling in the fields.
             id and name attributes: See <usernameField> -->
        <loginButton id="submit_button" name="login"/>
      </loginPageInfo>
    </webMail>

</clientConfig>

