---
title: setMaxRecipientsPercentage
slug: campaign/docs/setmaxrecipientspercentage
docTags: 
createdAt: 2026-07-02T19:01:46.338Z
---

The actual number of recipients is calculated when the mailing is started. The mailing must be of the type regular. See also [setMaxRecipients](docId\:KAtNVY5rdP7Vvo886Fyvy) and [getMaxRecipients](docId\:VEzW_87YbR72ib73blbuS).

**Type**: void

**Parameters**

| Name          | Type    | Value                                                                                                                 |
| ------------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
| sessionId     | String  | ID of the session                                                                                                     |
| mailingId     | long    | ID of the mailing                                                                                                     |
| maxRecipients | Float   | Maximum number of recipients (float between 0 and 1)                                                                  |
| randomOrder   | Boolean | TRUE: Recipients are selected on a random basis; FALSE: Recipients are selected by their ID starting with the lowest. |

**Return values**

- **Code structure**

```javascript
void setMaxRecipientsPercentage(String sessionId, long mailingId, float maxRecipientsPercentage, boolean randomOrder)
```
