The <EnumQuery> element is the SQL query to find all email addresses the database server will verify. The response should be one row for each email address and one for each alias. The columns of each row can contain:
The following code snippet builds an enumeration from a table of email addresses and a table of aliases. There are no unique IDs nor are there passwords:
<EnumQuery>
SELECT email_aliases.from_email AS Lookup,
email_accounts.email AS Aliased_To
FROM email_accounts INNER JOIN email_aliases
ON email_accounts.email = email_aliases.to_email
UNION
SELECT email,NULL
FROM email_accounts;
</EnumQuery>