Email & Notifications for AI Coders | SheCodes
Intermediate 5 min read

Email & Notifications for AI Coders

Send transactional emails, marketing campaigns, and push notifications from your app.

In this chapter

  • The difference between transactional and marketing emails
  • Which email service to pick (Resend, SendGrid, Postmark)
  • How to ask AI to send welcome emails, receipts, and resets
  • How to make sure your emails don't land in spam

Types of Email

Transactional Emails Triggered by user actions. Sent immediately to one person. Welcome email Password reset Order confirmation Invoice / Receipt Account verification Two-factor code
Marketing Emails Sent to groups for promotion. Requires unsubscribe link. Newsletter Product updates Promotional offers Re-engagement Event invitations Onboarding drip

Email Service Providers

Resend Modern email API built for developers. Beautiful DX, React Email support. From the makers of React Email. Recommended SendGrid By Twilio. Reliable, high-volume email delivery for transactional and marketing email. No free plan any more: new accounts get a 60-day trial. Popular
Postmark Fast transactional email delivery. Known for excellent deliverability rates. Transactional
Mailgun Developer-friendly email API. Good for high volume. Scalable
AWS SES Amazon's email service. Very cheap at scale. More setup required. Cheap at Scale
Mailchimp / Kit Marketing-focused. Email campaigns, audiences, automations. Less developer-oriented. (Kit was called ConvertKit until 2024.) Marketing

Building Email Templates

React Email Build emails using React components. Preview in browser. Works with Resend, SendGrid, etc. Modern
MJML Markup language for responsive emails. Compiles to HTML that works everywhere. Reliable
HTML Email (raw) Write email HTML directly. Challenging because email clients have limited CSS support. Manual
Email Builder (no-code) Drag-and-drop email builders in services like Mailchimp or SendGrid. No-Code

Other Notification Types

Push Notifications Browser or mobile push. Use Web Push API or services like OneSignal.
In-App Notifications Bell icon with notification dropdown. Real-time updates inside your app.
SMS Text messages via Twilio, Vonage, or AWS SNS. Good for 2FA codes.
Webhooks Send HTTP requests to other services when events happen. Slack, Discord, etc.

Prompt This

Copy-paste these prompts into your AI tool to apply what you just learned.

SET UP TRANSACTIONAL EMAIL

“Set up transactional email for my app using Resend. I need to send [welcome emails / password resets / notifications] with a clean HTML template.”

CREATE AN EMAIL TEMPLATE

“Create an email template for [type of email]. It should include my logo, a greeting, the main message, and a call-to-action button.”

Notification Infrastructure

Services that handle multiple notification channels in one place.

Novu Open-source notification infrastructure. Email, SMS, push, in-app: unified API. Open Source
Knock Notification workflow engine. Build complex notification flows without code. Workflows
OneSignal Push notification service. Web and mobile. Free tier available. Push Focus

Frequently Asked Questions

What's the easiest way to send emails from my app?

Resend is the simplest option. It has a clean API, React email templates, and a generous free tier (100 emails/day). Set up an API route, install the Resend package, and you can send emails in about 5 minutes with your AI tool.

How do I avoid my emails going to spam?

Three things: verify your domain with your email provider (SPF, DKIM, DMARC records), send from a real domain (not gmail.com), and don't use spammy subject lines. Most email services walk you through domain verification, and your AI tool can help set up the DNS records.

Should I use a service or my own email server?

Always use a service (Resend, Postmark, AWS SES). Running your own email server is one of the hardest things in infrastructure: deliverability, spam filtering, IP reputation. Services handle all of this for you, and Resend's free plan covers most small projects.