> ## 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.

# NSOutgoingMessage

> Details about a message to be sent.

Details about a message to be sent.

## Constructors

### NSOutgoingMessage()

```crmscript theme={null}
NSOutgoingMessage
```

Initializes a new instance of the NSOutgoingMessage class.

## Methods

## GetContent()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Content, or body, of the message.

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String content = thing.GetContent();
```

## GetFormat()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Format of content.

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String format = thing.GetFormat();
```

## GetFrom()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Who the message is from.  This can vary from provider to provider and can for SMS typically be a phone number or a string.  This is mail address on the form of an e-mail.

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String from = thing.GetFrom();
```

## GetParentMessagingId()

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

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - ID to the previous outgoing message related to this one. Used from message threading.

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
Integer parentMessagingId = thing.GetParentMessagingId();
```

## GetSuggestedSessionKey()

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

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

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String suggestedSessionKey = thing.GetSuggestedSessionKey();
```

## GetTo()

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

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - Address of the recipient. This can be in the form of phone number or email.

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String to = thing.GetTo();
```

## SetContent(String)

```crmscript theme={null}
Void SetContent(String content)
```

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

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String content;
thing.SetContent(content);
```

## SetFormat(String)

```crmscript theme={null}
Void SetFormat(String format)
```

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

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String format;
thing.SetFormat(format);
```

## SetFrom(String)

```crmscript theme={null}
Void SetFrom(String from)
```

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

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String from;
thing.SetFrom(from);
```

## SetParentMessagingId(Integer)

```crmscript theme={null}
Void SetParentMessagingId(Integer parentMessagingId)
```

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

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
Integer parentMessagingId;
thing.SetParentMessagingId(parentMessagingId);
```

## SetSuggestedSessionKey(String)

```crmscript theme={null}
Void SetSuggestedSessionKey(String suggestedSessionKey)
```

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

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String suggestedSessionKey;
thing.SetSuggestedSessionKey(suggestedSessionKey);
```

## SetTo(String)

```crmscript theme={null}
Void SetTo(String to)
```

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

**Example:**

```crmscript theme={null}
NSOutgoingMessage thing;
String to;
thing.SetTo(to);
```


## Related topics

- [NSMessagingAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSMessagingAgent.md)
- [outgoing_message table](/en/database/tables/outgoing-message.md)
- [SuperOffice.WebApi.Data.OutgoingMessage](/en/api/reference/webapi/SuperOffice.WebApi.Data.OutgoingMessage.md)
- [SuperOffice.WebApi.Agents.IMessagingAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IMessagingAgent.md)
- [SuperOffice.WebApi.Agents.MessagingAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.MessagingAgent.md)
- [Send Messages](/en/api/reference/restful/agent/messaging_agent/send-messages.md)
