Interface Inx_Api_Blacklist_BlacklistManager

Description

Sometimes you might want to exclude particular e-mail addresses or whole address ranges from Inxmail.

Sometimes you might want to exclude particular e-mail addresses or whole address ranges from Inxmail. For this purpose, there is a 'blacklist' of addresses, which can not be added to the Inxmail recipient list, neither by import nor by subscription or in any other ways. You can activate the blacklist feature from the

  1. SystemListContext
. The following snippet shows how this can be achieved:
   $oListContextManager = $oSession->getListContextManager();
   $oSystemListContext = $oListContextManager->findByName( Inx_Api_List_SystemListContext::NAME );

   $oSystemListContext->enableFeature( Inx_Api_Features::BLACKLIST_FEATURE_ID );
Using an Inx_Api_Blacklist_BlacklistEntry, you can block individual addresses or complete address ranges. A few examples:
  • name@firm.com - The address 'name@firm.com' is blocked.
  • *@firm.com - All personnel of this firm is blocked.
  • *.tv - No addresses from Tuvalu.
  • spam* - All addresses beginning with 'spam' are blocked.
  • martin@* - All Martins are blocked.
The following snippet shows how to create a blacklist entry that blocks all addresses ending on 'test.com':
 $oBlacklistManager = $oSession->getBlacklistManager();

 $oBlacklistEntry = $oBlacklistManager->createBlacklistEntry();
 $oBlacklistEntry->updateDescription( "All *test.com users" );
 $oBlacklistEntry->updatePattern( "*test.com" );
 $oBlacklistEntry->commitUpdate();
Note: The selectAfter, selectBefore and selectBetween methods expect an ISO 8601 formatted date string. This date string can be created as in the following snippet:
 $dateString = date('c');
Note: The usage of the blacklist requires the api user right: Inx_Api_UserRights::BLACKLIST_FEATURE_USE

For more information on blacklist entries, see the Inx_Api_Blacklist_BlacklistEntry documentation.

Located in /Api/Blacklist/BlacklistManager.php (line 53)

Inx_Api_BOManager
   |
   --Inx_Api_Blacklist_BlacklistManager
Method Summary
an selectAfter (string $searchDate)
an selectBefore (string $searchDate)
an selectBetween (startDate $startDate, stopDate $stopDate)
Methods
createBlacklistEntry (line 61)

Creates a new Inx_Api_Blacklist_BlacklistEntry.

Creates a new Inx_Api_Blacklist_BlacklistEntry.

  • return: the new Inx_Api_Blacklist_BlacklistEntry.
  • access: public
Inx_Api_Blacklist_BlacklistEntry createBlacklistEntry ()
findByPattern (line 71)

Returns the Inx_Api_Blacklist_BlacklistEntry with the specified pattern.

Returns the Inx_Api_Blacklist_BlacklistEntry with the specified pattern. The pattern is case insensitive.

  • return: the entry, or null if no entry was found.
  • access: public
Inx_Api_Blacklist_BlacklistEntry findByPattern (string $sPattern)
  • string $sPattern: the pattern to find
selectAfter (line 83)

Returns a result set containing all blacklist entries in the system which were created or changed after the specified date.

Returns a result set containing all blacklist entries in the system which were created or changed after the specified date.

  • return: Inx_Api_BOResultSet containing all blacklist entries matching the condition.
  • throws: SecurityException if the session user doesn't have the following permission: Inx_Api_UserRights::BLACKLIST_FEATURE_USE
  • access: public
an selectAfter (string $searchDate)
  • string $searchDate: all entries after this date will be selected. The date has to be formatted as ISO 8601.
selectBefore (line 95)

Returns a result set containing all blacklist entries in the system which were created or changed before the specified date.

Returns a result set containing all blacklist entries in the system which were created or changed before the specified date.

  • return: Inx_Api_BOResultSet containing all blacklist entries matching the condition.
  • throws: SecurityException if the session user doesn't have the following permission: Inx_Api_UserRights::BLACKLIST_FEATURE_USE
  • access: public
an selectBefore (string $searchDate)
  • string $searchDate: all entries before this date will be selected. The date has to be formatted as ISO 8601.
selectBetween (line 108)

Returns a result set containing all blacklist entries in the system which were created or changed between the specified dates.

Returns a result set containing all blacklist entries in the system which were created or changed between the specified dates.

  • return: Inx_Api_BOResultSet containing all blacklist entries matching the condition.
  • throws: SecurityException if the session user doesn't have the following permission: Inx_Api_UserRights::BLACKLIST_FEATURE_USE
  • access: public
an selectBetween (startDate $startDate, stopDate $stopDate)
  • startDate $startDate: the start date for the search. The date has to be formatted as ISO 8601.
  • stopDate $stopDate: the end date for the search. The date has to be formatted as ISO 8601.

Inherited Methods

Inherited From Inx_Api_BOManager

Inx_Api_BOManager::get()
Inx_Api_BOManager::remove()
Inx_Api_BOManager::selectAll()

Documentation generated on Thu, 17 Sep 2015 14:27:21 +0200 by phpDocumentor 1.3.2