Prompts
Mailtrap provides its users with ready-to-copy prompts that include the context AI agents like Cursor or Copilot need to integrate sending into your app/project. You can use AI prompts when you want to:
Start sending emails in minutes without having to manually copy/paste sending configurations.
Avoid typos and mistakes that commonly come when handling code.
Learn how the actual code works by following what AI is doing.
How to use AI prompts
First, navigate to the Sending Setup page under API/SMTP and choose one of the three available prompt types:
API – Focuses on integrating via the Mailtrap Email API
SMTP – Focuses on configuring SMTP sending
AI – Generates a prompt that covers the complete Mailtrap sending setup

Keep in mind that the generated prompt depends on several selections, so make sure you choose the right options before copying it. These include the following:
Domain – The sending domain being configured
Stream – Transactional or Bulk
Prompt type – AI, API, or SMTP
Technology stack – Choose the stack that matches your project. For example, cURL, PHP, Node.js, etc.
Once you're done selecting the desired parameters, simply click Copy for AI and get your prompt.

Since AI is prone to hallucination and errors, make sure to verify the output before sending any emails to real users.
Last updated
Was this helpful?

