MEAOAM.AddressMap with multiple SMTP Addresses

Discussion for developers using MailEnable.
Post Reply
acropia
Posts: 1
Joined: Mon Jun 08, 2015 6:25 pm
Location: Drachten / FRL / NL

MEAOAM.AddressMap with multiple SMTP Addresses

Post by acropia » Mon Jun 08, 2015 6:39 pm

Hi,

I am a MailEnable Enterprise 8.60 user and like to talk COM with MailEnable. All looks like working (mailboxes, groups, etc.) except for Address Maps. The API docs show that there should exist methods like GetAddressMap(), FindFirstAddressMap() and FindNextAddressMap(). This is just like the Mailbox and Group Classes.

But the behaviour on Address Maps does not look consistent with the Mailbox and Group class. On Mailbox and Group classes the methods work like:
- Get*() - get current object from list
- FindFirst*() - get first object from list, and offset pointer by 1
- FindNext*() - get current object from list, and offset pointer by 1

When I use those three methods on a AddressMap, the all result the same (first) SMTP Address on a mailbox. Whatever I try, I can not get a listing of Address Maps.

Test script ==

Code: Select all

<?php
$mailboxUser = "user";
$postoffice = "domain.tld";

$addressMap = new COM("MEAOAM.AddressMap");
$addressMap->Account = $postoffice;
$addressMap->DestinationAddress = "[SF:".$postoffice."/".$mailboxUser."]";
if ( $addressMap->FindFirstAddressMap()) {
    do {
        echo $addressMap->SourceAddress."\n";
    } while ($addressMap->FindNextAddressMap());
}
Expected behaviour ==
On a Mailbox 'user' in Post Office 'domain.tld' with multiple 'Email Adresses for Mailbox' on GUI tab 'Addresses' I expect the result:

Code: Select all

[SMTP:user@domain.tld]
[SMTP:user@seconddomain.tld]
[SMTP:user@thirddomain.tld]
Actual behaviour ==
On a Mailbox 'user' in Post Office 'domain.tld' with multiple 'Email Adresses for Mailbox' on GUI tab 'Addresses' I actually get the following result:

Code: Select all

[SMTP:user@domain.tld]

Post Reply