AI Prompts

Copy a prompt. Paste it into your AI. Ship a working contact form.

Battle-tested prompts for Claude, ChatGPT, Cursor, Lovable, v0.dev, bolt.new. Each one tells the AI exactly how to wire submissions into your JS2Mail mailbox — no backend, no signup detour for your AI.

Copy-and-go format
Slot placeholders for your form ID
Works with any major AI tool
Don't have a form ID yet?
Start free, connect a mailbox, create a form in 60 seconds. Or wait for the JS2Mail MCP server (Faz 5D) — your AI provisions it for you.
Start free
AI Builder Guide — full walkthrough
Step-by-step: connect a mailbox, grab your form ID, wire up the form — with code snippets for plain HTML, AJAX, and React.
FOR · ChatGPT · Claude · Lovable · v0 · bolt.new
Build a full corporate site with a working contact form
Generate a complete one-page corporate site (hero, about, services, contact). Contact form posts to JS2Mail, submissions land in your inbox. Output: single HTML file, no backend.
contact-form static-html full-site
Build a complete one-page corporate website for {{BUSINESS_NAME}},
a {{INDUSTRY}} company. Style: modern, responsive, Tailwind CSS (CDN), light/dark
themable, accent color {{ACCENT_HEX}}.

Sections:
- Hero with {{BUSINESS_TAGLINE}}
- About (2-3 paragraphs)
- Services or products (3 cards)
- Working contact form
- Footer

Critical for the contact form:
- Form action must be: https://api.js2mail.dev/f/{{YOUR_JS2MAIL_FORM_ID}}
- Method: POST
- Required fields: name, email, message
- Optional fields: phone, company
- Add hidden honeypot: <input name="_honey" style="display:none">
- Form fields can use any name= you want — JS2Mail accepts everything
- Do NOT add any backend code or server.js — JS2Mail handles submission
- After submit, browser is redirected to a /thanks page (create it)

Output: single self-contained HTML file with Tailwind via CDN, all CSS inline,
all logic in plain HTML. No build step. No package.json. No JavaScript framework.
FOR · ChatGPT · Claude · Cursor · Continue
Add a contact form to my existing site
Drop a working contact form into HTML you already have. Same JS2Mail action URL pattern. Minimal styling change to match your existing brand.
contact-form existing-html
I'm sharing my existing index.html below. Add a Contact Us section
with a working form. Constraints:

- Form must POST to: https://api.js2mail.dev/f/{{YOUR_JS2MAIL_FORM_ID}}
- Match the existing site's color palette and typography
- Required fields: name, email, message
- Add hidden honeypot: <input name="_honey" style="display:none">
- Add native HTML5 validation (required, type="email")
- No JavaScript framework — plain form submit is enough
- After submit, redirect to existing /thanks page if one exists

Don't add any backend code. JS2Mail handles processing.

My current index.html:

[paste your HTML here]
FOR · Cursor · Continue · ChatGPT · Claude
Newsletter signup with React + JS2Mail
React component for an inline newsletter signup. Submits via fetch, shows success/error states, no full-page redirect.
newsletter react ajax
Create a React component <NewsletterSignup /> that submits an email
to JS2Mail. Requirements:

- Use the fetch API to POST to https://api.js2mail.dev/f/{{YOUR_JS2MAIL_FORM_ID}}
- Send the request as multipart/form-data (use FormData)
- Add header "Accept: application/json" so JS2Mail returns JSON instead of redirecting
- Show three UI states: idle, submitting, success/error
- Include a hidden honeypot field (input name="_honey")
- Style with Tailwind classes
- TypeScript, functional component, useState for state
- Include the form field 'email' and 'source' (hidden, set to "landing")

Don't pull in any form library — useState is enough.
FOR · ChatGPT · Claude · v0
Brutalist contact form (Tailwind, no rounded corners)
Same form, but loud styling. Demonstrates that JS2Mail puts no constraints on visual design — only the action URL.
contact-form tailwind design
Generate a CONTACT FORM in brutalist web style. Use Tailwind CSS.
- Sharp corners (no rounded)
- Heavy black borders (4px)
- Monospace font throughout
- Big primary CTA button, full-width, black background, no hover transition
- Form fields stacked vertically, generous padding
- Labels in ALL CAPS

Form action: https://api.js2mail.dev/f/{{YOUR_JS2MAIL_FORM_ID}}
Method: POST
Fields: name (required), email (required, type=email), message (required, textarea, 6 rows)
Hidden honeypot: <input name="_honey" style="display:none">
After submit redirect: /thanks

Output: a single HTML snippet that I can paste into any page. No imports.
FOR · Cursor · Continue · ChatGPT
Transactional welcome email from Next.js signup
Server-side: after user signs up, send a welcome email through the JS2Mail transactional API. Uses an API key (not a form endpoint).
transactional nextjs api
In a Next.js 15 App Router project, add a server action `sendWelcomeEmail(email)`
that calls the JS2Mail transactional API.

Requirements:
- Use process.env.JS2MAIL_KEY (server-side only, never expose to client)
- Endpoint: POST https://api.js2mail.dev/v1/mail/send
- Header: "X-Api-Key: ${process.env.JS2MAIL_KEY}"
- Body (JSON):
    {
      "to": [recipientEmail],
      "subject": "Welcome to {{BUSINESS_NAME}}",
      "bodyHtml": "<p>Hi {{name}},</p><p>Thanks for joining...</p>",
      "bodyText": "Hi {{name}}, thanks for joining..."
    }
- On 202 Accepted, return success
- On 401 (bad key) or 4xx (validation), throw with the error body's message
- On 5xx, swallow but log — don't fail the signup flow

Use the native fetch (no node-fetch / axios). TypeScript. Add JSDoc.
Show how to call this from a server action.
FOR · Lovable · v0.dev · bolt.new
Lovable / v0.dev one-liner
Optimized for AI website builders that need terse, action-oriented prompts. Plug your form ID into the URL and paste.
contact-form ai-builder lovable v0
Build a {{BUSINESS_TYPE}} landing page with a contact form. The form
must POST to https://api.js2mail.dev/f/{{YOUR_JS2MAIL_FORM_ID}} — that's a JS2Mail
endpoint, no backend code needed. Form fields: name, email, message. Hidden
honeypot: <input name="_honey" style="display:none">. Use {{COLOR_SCHEME}}
palette. Mobile-first. No external dependencies beyond Tailwind CDN.
FOR · Claude Code · Cursor · Continue (MCP)
Create a JS2Mail account without signing up
Let the AI provision a JS2Mail workspace and return a live API key in one shot. No browser signup required — just a claim email to set a password later.
mcp account provisioning api transactional
I need to send transactional emails from my application. Use the JS2Mail
MCP server to provision a workspace for me now.

Call the createApiAccount tool with:
- ownerEmail: {{YOUR_EMAIL}}
- appName: "{{APP_NAME}}"

After the tool responds:
1. Show me the API key exactly as returned — I need to copy it now, it won't be shown again
2. Tell me the claim URL so I can set a password and connect a mailbox later
3. Show me a minimal code snippet for my stack ({{LANGUAGE_OR_FRAMEWORK}}) that calls
   POST https://api.js2mail.dev/v1/mail/send with that key

Do NOT ask me to go to js2mail.dev or create an account manually.
The MCP tool handles provisioning — just call it.
FOR · Cursor · Continue · ChatGPT · Claude Code
Integrate JS2Mail into a server-side application
Full integration recipe for any backend stack. Covers API key wiring, a reusable mail helper, and the three most common transactional flows: welcome, password reset, notification.
transactional server api integration backend
I'm building a server-side application in {{LANGUAGE_OR_FRAMEWORK}}.
Integrate JS2Mail for transactional email. I already have an API key.

Requirements:

1. Wire the key as an environment variable JS2MAIL_API_KEY (never hard-code it)

2. Create a reusable sendMail helper that:
   - POSTs to https://api.js2mail.dev/v1/mail/send
   - Sets header X-Api-Key from the env var
   - Accepts: to (string[]), subject, bodyHtml, bodyText?, idempotencyKey?
   - Returns the send id on 202, throws a typed error on 4xx/5xx
   - Logs the response status and id (don't log the key)

3. Implement these three callers using the helper:
   a) sendWelcomeEmail(user) — on new registration
   b) sendPasswordReset(user, resetUrl) — on forgot-password request;
      use idempotencyKey = "pwd-reset-" + user.id so duplicate clicks don't
      send twice
   c) sendNotification(user, title, body) — generic in-app notification email

4. Show where to call each one in my existing code flow
   (show the relevant function/route, not the whole file)

My stack: {{LANGUAGE_OR_FRAMEWORK}}
My existing auth/user model: {{BRIEF_DESCRIPTION_OR_PASTE_CODE}}
FOR · Claude Code · Cursor with MCP
Have Claude Code create the form for you
Skip the dashboard entirely. With the JS2Mail MCP server installed, ask Claude to provision a form, then drop the snippet. (MCP server ships with Faz 5D.)
mcp claude cursor automation
I need a contact form on my website. Use the JS2Mail MCP server to:

1. Provision a new form endpoint with these settings:
   - Name: "Contact us"
   - Deliver to: {{YOUR_EMAIL}}
   - Allowed origin: {{YOUR_DOMAIN}}
   - Subject template: "New contact — {{name}} ({{email}})"

2. Paste the resulting <form> HTML snippet into my index.html (find the
   <main> tag and append a <section id="contact"> with the form inside).

3. After completion, tell me to check {{YOUR_EMAIL}} for the JS2Mail claim
   link — that's how I'll manage submissions later.

Don't ask me to sign up first. The MCP tool does that automatically.

Built something with JS2Mail?

Share your AI-generated site or prompt with the community. Fork the examples repo, drop in your static folder, and open a PR.

Submit your example Browse examples →

Or email a prompt idea to [email protected]