For the complete documentation index, see llms.txt. This page is also available as Markdown.

Anything

Step-by-step guide on how to integrate Mailtrap with your Anything application to send emails.

Anything is an AI agent that can turn your ideas into sites, apps, tools, products, and more with simple prompts. In this article, you’ll learn how to connect it to Mailtrap and add email-sending functionality to your projects.

Note: Mailtrap offers a free, 4000 email/month Email API and SMTP plan.

Prerequisites:

Step 1. Add your Mailtrap credentials

To add your Mailtrap credentials, open Project Settings in the sidebar, navigate to Secrets, and click on the Add new secret button.

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

  • MAILTRAP_API_TOKEN

This is the Mailtrap API token, which you can create at any time from your account. And here’s what the secret should look like:

  • MAILTRAP_FROM_EMAIL

This is the email address with the verified Mailtrap sending domain you’ve added after creating an account. And here’s the secret:

Once you’re done adding the secrets, simply tell the Anything AI that you’re done with a prompt like this one, for example:

Please use Mailtrap email API for sending emails from my project, I've added the MAILTRAP_API_TOKEN and MAILTRAP_FROM_EMAIL secrets

The AI will then go over Mailtrap Email API documentation, connect it to your project, and confirm once it’s done.

Step 2. Start sending emails

Once you add your credentials, 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:

And here it is in the Mailtrap Email Logs:

If you plan on collecting email addresses for a list, you can connect your Anything project with Mailtrap Contacts and store your addresses in your Mailtrap account automatically. For reference, check out the official Mailtrap Contacts API documentation.

Next steps

Last updated

Was this helpful?