Sample code for 30+ languages & platforms
Perl Requires Chilkat v11.0.0+

Transition from MailMan.TransferMultipleMime to MailMan.FetchMimeBd

Provides instructions for replacing deprecated TransferMultipleMime method calls with FetchMimeBd.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$mailman = chilkat::CkMailMan->new();

#  ...
#  ...

$saUidls = chilkat::CkStringArray->new();
$saUidls->Append("aaa");
$saUidls->Append("bbb");
$saUidls->Append("ccc");

$stUidls = chilkat::CkStringTable->new();
$stUidls->Append("aaa");
$stUidls->Append("bbb");
$stUidls->Append("ccc");

#  ------------------------------------------------------------------------
#  The TransferMultipleMime method is deprecated:

# sa is a StringArray
$sa = $mailman->TransferMultipleMime($saUidls);
if ($mailman->get_LastMethodSuccess() == 0) {
    print $mailman->lastErrorText() . "\r\n";
    exit;
}

#  ...
#  ...

#  ------------------------------------------------------------------------
#  Do the equivalent using FetchMimeBd.

$mailman->put_ImmediateDelete(0);

$success = 0;
$bdMime = chilkat::CkBinData->new();
$numUidls = $stUidls->get_Count();
$i = 0;
while ($i < $numUidls) {
    $success = $mailman->FetchMimeBd($stUidls->stringAt($i),$bdMime);
    #  ...

    #  Mark the email for deletion.
    $success = $mailman->DeleteByUidl($stUidls->stringAt($i));
    #  ...

    $i = $i + 1;
}

#  emails marked for deletion will be deleted at this time
$success = $mailman->Pop3EndSession();