# WrapLongURL()

Returns a shortened URL when provided with a URL that contains over 975 characters. Use this function to mitigate a known limitation with long URLs in Microsoft Outlook 2007–2013.

URLs that you shorten using this function are incompatible with Always On Clicks. If your Member DB is unavailable, the function returns an error.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
WrapLongURL(urlToShorten)
```

The `WrapLongURL()` function has one parameter:

- `urlToShorten` (string): Required. The URL to shorten.

## Usage

To use the function, pass it a URL to shorten. This example uses the resulting shortened URL in an HTML \<img> tag.

```html
<!-- URL shortened for the purposes of illustration -->
<img
  src='%%=WrapLongURL("http://example.com/cb7de81e0b2845bd461c4543...8eef4715bbbe52c33831a02f/image.jpg")=%%'
/>
```

If the URL contains more than 975 characters, the function returns a shortened link that redirects through the Marketing Cloud Engagement servers. If the URL contains fewer than 975 characters, the function returns the URL unchanged.
