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

The recipient is not removed from the recipient list (but will not receive any further mailings) until the [remove](docId\:dFYi1WMspQXU0JeOQrALx) method is invoked or the recipient re-subscribes using a normal opt-in process.

In addition to the [add2](docId:3Gac5czibNCsTeB5Fsu-E) method, the mailing the recipient received before she/he unsubscribed will be preserved. See also [MailIdWebservice](docId\:nrghOv9wEIlJ_r41HkUP-).

**Type**: void

**Parameters**

| Name      | Type   | Value             |
| --------- | ------ | ----------------- |
| sessionId | String | ID of the session |
| mailId    | String | ID of the email   |

**Return values**

- **Code structure**

```javascript
void addByMailId(String sessionId, String mailId)
```
