Anything

Anythingarrow-up-right 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.

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 tokenarrow-up-right, 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 documentationarrow-up-right, 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 Logsarrow-up-right:

circle-info

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

Next steps

Last updated

Was this helpful?