> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NSMailbox

> Carrier containing information about a Service mailbox.

Carrier containing information about a Service mailbox.

## Constructors

### NSMailbox()

```crmscript theme={null}
NSMailbox
```

Initializes a new instance of the NSMailbox class.

## Methods

## GetAddress()

```crmscript theme={null}
String GetAddress()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The address associated with this mailbox (used as FROM address when sending emails).

**Example:**

```crmscript theme={null}
NSMailbox thing;
String address = thing.GetAddress();
```

## GetCategoryName()

The name of the category that the mailbox is connected to

```crmscript theme={null}
String GetCategoryName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String)

**Example:**

```crmscript theme={null}
NSMailbox thing;
String categoryName = thing.GetCategoryName();
```

## GetMailInFilterId()

```crmscript theme={null}
Integer GetMailInFilterId()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - The primary key (auto-incremented).

**Example:**

```crmscript theme={null}
NSMailbox thing;
Integer mailInFilterId = thing.GetMailInFilterId();
```

## GetPriorityName()

```crmscript theme={null}
String GetPriorityName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The name of the priority that the mailbox is connected to.

**Example:**

```crmscript theme={null}
NSMailbox thing;
String priorityName = thing.GetPriorityName();
```

## SetAddress(String)

```crmscript theme={null}
Void SetAddress(String address)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSMailbox thing;
String address;
thing.SetAddress(address);
```

## SetCategoryName(String)

```crmscript theme={null}
Void SetCategoryName(String categoryName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSMailbox thing;
String categoryName;
thing.SetCategoryName(categoryName);
```

## SetMailInFilterId(Integer)

The primary key (auto-incremented)

```crmscript theme={null}
Void SetMailInFilterId(Integer mailInFilterId)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSMailbox thing;
Integer mailInFilterId;
thing.SetMailInFilterId(mailInFilterId);
```

## SetPriorityName(String)

The name of the priority that the mailbox is connected to

```crmscript theme={null}
Void SetPriorityName(String priorityName)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSMailbox thing;
String priorityName;
thing.SetPriorityName(priorityName);
```


## Related topics

- [NSCustomerServiceAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSCustomerServiceAgent.md)
- [NSMailboxEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSMailboxEntity.md)
- [Create mailboxes](/en/email/admin/mailbox/create-mailbox.md)
- [Delete mailbox](/en/email/admin/mailbox/delete-mailbox.md)
- [Get Mailboxes](/en/api/reference/restful/agent/customerservice_agent/get-mailboxes.md)
- [Create SMS mailbox](/en/email/admin/mailbox/create-sms-mailbox.md)
