Change the folder settings for message forwarding for a BlackBerry device
To change the message folders that the
BlackBerry® Enterprise Server redirects to a
BlackBerry device, you can use the
setPersonalRedirectionFolderInformation()
method.
Before you begin: Retrieve the
userID integer for the user account assigned to the
BlackBerry device
that you want to change the folder settings for.
-
Invoke findPersonalRedirectionFolderInformation() to retrieve the folder settngs.
FindPersonalRedirectionFolderInformationResult findResult = emailDominoWebService.findPersonalRedirectionFolderInformation( userID );
-
Check the result for errors and handle any errors.
if( findResult.getFindPersonalRedirectionFolderInformationReturnStatus().getCode() != FindPersonalRedirectionFolderInformationStatusEnumType.SUCCESS )
{
// handle any errors
}
-
Retrieve the folder settings and change the redirection type to INBOX_ONLY, INBOX_AND_SENT_ITEMS_ONLY, or SELECTED_FOLDERS.
PersonalRedirectionFolderInformation redirectionInformation = findResult.getPersonalRedirectionFolderInformation();
redirectionInformation.setRedirectionType(PersonalRedirectionFolderInformationTypeEnumType.INBOX_AND_SENT_ITEMS_ONLY );
- Invoke setPersonalRedirectionFolderInformation() to change the folder settings.
SetPersonalRedirectionFolderInformationResult setRedirectionResult = emailDominoWebService.setPersonalRedirectionFolderInformation( userId, redirectionInformation );
-
Check the result for errors and handle any errors.
if( setRedirectionResult.getSetPersonalRedirectionFolderInformationReturnStatus().getCode()!= SetPersonalRedirectionFolderInformationStatusEnumType.SUCCESS )
{
// handle any errors
}
Was this information helpful? Send us your comments.