Turn on message forwarding for user accounts

If you included an email web service when you generated your client proxy, to turn on message forwarding capabilities for user accounts, you can use the multi-object EnableUsersMailRedirection() method. You must use the email web service for the email platform that is installed in your environment. To turn on message forwarding for one user account, you can use the single-objectEnableUserMailRedirection() method.
Before you begin: Retrieve the userIDs integer array for the user account IDs that you want to turn on message forwarding for.
  1. Invoke enableUsersMailRedirection.
    1. If your organization uses the Microsoft® Exchange messaging platform, use the email web service for Microsoft Exchange.
      EnableUsersMailRedirectionResult result = emailExchangeWebService.enableUsersMailRedirection( userIds, true );
    2. If your organization uses the IBM® Lotus® Domino® messaging platform, use the email web service for IBM Lotus Domino.
      EnableUsersMailRedirectionResult result = emailDominoWebService.enableUsersMailRedirection( userIds, true );
  2. Check the result for errors and handle any errors.
    if( result.getEnableUserMailRedirectionReturnStatus().getCode() != EnableUserMailRedirectionReturnStatusEnumType.SUCCESS )
    {
         // handle any errors
    }

Was this information helpful? Send us your comments.