# Templates

A "Template" is the content of the emails that are sent to targets. They can be imported from an existing email, or created from scratch. They also support sending attachments.

Additionally, templates can contain tracking images so that gophish knows when the user opens the email.

## Creating Templates

To create a template, first navigate to the “Email Templates” page and click the “New Template” button.

![New Template Dialog](https://imgur.com/FPqcZOG.png)

### Using the HTML Editor

A powerful feature of Gophish is the HTML editor. To switch between the HTML source code and the visual view, click the "Source" button.

![HTML Editor](https://imgur.com/elue6xK.png)

This is helpful to ensure that the email received by the user is pixel-perfect.

### Importing an Email

Gophish supports the ability to import an email from the raw content. To do this, click the "Import Email" button and paste in the original email content. This content is usually found through the "View Original" feature of many mail clients:

![Import Email](https://imgur.com/QAZCrHu.png)


---

# 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://docs.getgophish.com/user-guide/documentation/templates.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.
