---
schema_version: "1"
id: f78bb475d737796b328f09654ae7a527134dcd04e7e89988c71f10f8128a68a3
title: Email functions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_emailFunctions.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_emailFunctions.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5055f7bbf1302f9a3cd710017cc0c57d13e8022c61ca382068d128e74fd817d8
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Email functions

These functions allow you to access and control email messages within your Marketing Cloud Engagement account.

## Load

Use the Email Server-Side JavaScript Functions In your server-side JavaScript code, first load the core library using the syntax below:

```
Platform.Load("core", "1");
```

## Initialization

To interact with an email via server-side JavaScript, you must first initialize the object. The code below initializes an email with the external key of 'myEmail'.

```
var myEmail = Email.Init("myEmail");
```

Once you initialize the email, you can use the associated functions.

You can’t set the external key for an email message manually via the user interface. You can manually set the external key of an email address created via the SOAP API, or you can find the appropriate value by performing a retrieve on the email message and taking the value from the results.
