updateConfig method
Future<void>
updateConfig({
- required String folderPath,
- required MailboxType type,
- int? maxMessages,
- int? retentionDays,
- int? retentionCount,
Update mailbox configuration
Implementation
Future<void> updateConfig({
required String folderPath,
required MailboxType type,
int? maxMessages,
int? retentionDays,
int? retentionCount,
}) async {
_logger.fine('Updating config for $folderPath');
final address = MailboxAddress(
ownerId: host.id,
folderPath: folderPath,
type: type,
);
final request = UpdateMailboxConfigRequest(
address: address,
maxMessages: maxMessages,
retentionDays: retentionDays,
retentionCount: retentionCount,
);
final response = await _sendRequest(request);
if (!response.success) {
throw MailboxManagementError(
response.errorMessage ?? 'Failed to update config',
);
}
_logger.info('Updated config for ${address.fullPath}');
}