---
title: setMaxMailsPerHour
slug: campaign/docs/setmaxmailsperhour
docTags: 
createdAt: 2026-07-02T19:01:46.737Z
---

The mailing must be of the type regular.

**Type**: void

**Parameters**

| Name            | Type   | Value                                                                                                                            |
| --------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------- |
| sessionId       | String | ID of the session                                                                                                                |
| mailingId       | long   | ID of the mailing                                                                                                                |
| maxMailsPerHour | int    | Maximum sending rate (mails per hour) for the mailing—must be greater than 1000<br /><br />The value -1 means **No throttling**. |

**Return values**

- **Code structure**

```java
void setMaxMailsPerHour(String sessionId, long mailingId, int maxMailsPerHour);
```
