> For the complete documentation index, see [llms.txt](https://docs.mailtrap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailtrap.io/guides/ai-powered-integrations/leap-new.md).

# Leap.new

Leap.new is an AI developer agent that lets you build and deploy production-grade applications directly to your own cloud on AWS & GCP. In this guide, you’ll learn how to integrate it with Mailtrap and add email-sending capabilities to your Leap.new projects.

**Prerequisites**:

* A Leap.new account and a project.
* A Mailtrap account for sending emails.

### Step 1. Add your Mailtrap credentials

To add your Mailtrap credentials, open **Settings**, navigate to **Secrets**, and click on the **New secret** button.

<figure><img src="/files/8dykFMV5o9IWQWHd11ux" alt=""><figcaption></figcaption></figure>

This way, you need to add the following two variables:

* `MAILTRAP_API_TOKEN` – This is the [Mailtrap API token](https://docs.mailtrap.io/email-api-smtp/setup/api-tokens), which you can create at any time in your account.
* `MAILTRAP_FROM_EMAIL` – This is the email address with the verified Mailtrap sending domain you’ve added after creating an account.

<figure><img src="/files/t7k688xakZIlXWON5P5z" alt=""><figcaption></figcaption></figure>

Once you’re done adding the variables, simply tell the Leap.new AI that you’re done with a prompt like this one, for example:

> Please use Mailtrap email api for sending, I've added the required environment variables

The AI will then go over [Mailtrap Email API documentation](https://docs.mailtrap.io/developers), connect it to your project, and confirm once it’s done.

### Step 2. Start sending emails

Finally, to test your configuration, try sending an email from your project. If you followed everything thus far, you should receive the email in your inbox in a few seconds. Here it is in a Gmail inbox I used as my `to` address:

<figure><img src="/files/VEGcmv8r7zheUWKWI0V9" alt=""><figcaption></figcaption></figure>

And here it is in the Mailtrap [Email Logs](https://docs.mailtrap.io/email-api-smtp/analytics/logs).

<figure><img src="/files/vAwc4cKwQmzE9dIS7uc5" alt=""><figcaption></figcaption></figure>

**Before you go**: If you want to collect email addresses for a list, you can connect your Leap.new project with [Mailtrap Contacts](https://docs.mailtrap.io/email-marketing/contacts/overview) and store your addresses in the Mailtrap Lists automatically. For reference, check out the official [Mailtrap Contacts API documentation](https://docs.mailtrap.io/developers/email-marketing/overview).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mailtrap.io/guides/ai-powered-integrations/leap-new.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
