# Open an email

Enhance your video's interactivity by incorporating a feature that allows viewers to open an email with pre-filled data directly from the video. This functionality can be particularly useful in various scenarios, such as providing feedback, contacting support, or even sending a pre-composed message to a specific address. Here's a step-by-step guide to implementing this feature, along with examples to illustrate its utility.

To begin, you'll need to use an **`interactive → expression`** connector within your video editing platform. Here, you'll input a specific code snippet that triggers the email client to open with predefined content. Copy and paste the following JavaScript code into the connector:

Next, customize the code by replacing the placeholder text:

* Change **`"Email subject"`** to your desired email subject line.
* Replace **`"Email message"`** with your intended message content.
* Substitute **`"someone@yoursite.com"`** with the recipient's email address.

### **Example 1: Feedback Request**

Let's say you want to encourage viewers to provide feedback after watching a tutorial video. You could set up the email prompt as follows:

```jsx
jsxCopy code
(data, liveData, event, element, player) => {
  const subject = "Feedback on Tutorial Video";
  const message = "Please share your thoughts or suggestions regarding the tutorial you just watched.";
  const mail = "feedback@yoursite.com";
  window.open(`mailto:${mail}?subject=${subject}&body=${message}`);
}

```

### **Example 2: Contact Support**

If your video deals with troubleshooting a product, you might want the viewer to have the option to contact support directly:

```jsx
jsxCopy code
(data, liveData, event, element, player) => {
  const subject = "Need Support with Product X";
  const message = "I'm reaching out for support regarding Product X as described in the video.";
  const mail = "support@yoursite.com";
  window.open(`mailto:${mail}?subject=${subject}&body=${message}`);
}

```

By following these steps and utilizing the examples as guides, you can create a more interactive and user-friendly video experience that encourages viewers to engage directly from the video platform.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.blings.io/creator/studio/custom-elements-advance/open-an-email.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
