Let your AI assistant add email for you
Copy one of these into Cursor, Claude Code, Lovable, Bolt or Replit. It carries the settings and, more importantly, the constraints an assistant would otherwise have to guess — which is what stops it writing email code that never sends.
Cursor, Claude Code, Windsurf, Copilot — anywhere the assistant can see your repo.
Any stack prompt
Add transactional email to this app using SMTP.
Read these from environment variables (never hard-code them):
SMTP_HOST=smtp.email4vibecoder.com
SMTP_PORT=587 # STARTTLS (or 465 for implicit TLS)
SMTP_USER=<username from the dashboard>
SMTP_PASS=<password from the dashboard>
MAIL_FROM=hello@<my verified domain>
Create one sendEmail(to, subject, html) helper using this stack's
standard SMTP library (Nodemailer for Node.js, smtplib for Python,
Swiftmailer/Symfony Mailer for PHP), then use it for sign-up
confirmation and password-reset emails.
Requirements:
- The send must run on the server, never in browser code.
- Reuse one transport/connection rather than creating one per message.
- Log the real error and surface a friendly one; never fail silently.
- Do not add a provider SDK — plain SMTP only.Before you paste it
The prompt refers to a username, a password and a verified domain. All three come from your dashboard, and the free plan gives you 500 emails a month without a card:
- Create an account and add your domain under Domains.
- Paste the DKIM record we generate into your DNS and wait for it to verify.
- Create an SMTP credential — the password is shown once, so put it straight into your environment variables.
Full setup instructions per framework are in the integration guide, and the per-tool gotchas are in the guides.