skills/integrations-apis/email-service-integration/SKILL.md
Send reliable transactional emails (order confirmations, shipping updates) via SendGrid, SES, or Postmark with templates and deliverability best practices
npx skillsauth add finsilabs/awesome-ecommerce-skills email-service-integrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transactional emails — order confirmations, shipping notifications, password resets, and account alerts — are critical customer touchpoints that must arrive instantly and reliably. This skill covers setting up email delivery on each platform and integrating dedicated transactional services (SendGrid, Amazon SES, Postmark) with SPF/DKIM/DMARC DNS records for deliverability, reusable templates, and bounce/complaint handling.
| Platform | Default Email | Recommended Upgrade | |----------|--------------|-------------------| | Shopify | Shopify Email (built-in, branded templates, free up to 10K/month) | Customize templates in Settings → Notifications; for high volume or advanced flows use Klaviyo or Omnisend | | WooCommerce | WordPress sends via your hosting server (poor deliverability) | Install FluentSMTP (free) to route via SendGrid/SES/Postmark; use WooCommerce Email Customizer ($49) for branded templates | | BigCommerce | BigCommerce built-in transactional email (basic templates) | Customize templates in Marketing → Transactional Emails; for advanced templates use Klaviyo BigCommerce integration | | Custom / Headless | None — you build it | Integrate SendGrid, Postmark, or Amazon SES directly; build templates with React Email; see implementation below |
Customize built-in transactional emails:
Set up Shopify Email for marketing flows:
Fix email deliverability with FluentSMTP:
Set up SPF and DKIM for your sending domain:
Most providers give you specific DNS records to add. For SendGrid:
Customize WooCommerce email templates:
Customize transactional email templates:
%%ORDER_NUMBER%%, %%TOTAL_COST%%)Connect Klaviyo for advanced flows:
Configure DNS for deliverability first — SPF, DKIM, and DMARC are mandatory before any emails reach inboxes:
; SPF — authorize SendGrid to send on behalf of your domain
mystore.com. IN TXT "v=spf1 include:sendgrid.net ~all"
; DKIM — SendGrid provides two CNAME records:
s1._domainkey.mystore.com IN CNAME s1.domainkey.u12345.wl.sendgrid.net.
s2._domainkey.mystore.com IN CNAME s2.domainkey.u12345.wl.sendgrid.net.
; DMARC — start with p=none to monitor, then escalate to p=quarantine
_dmarc.mystore.com IN TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
Verify with mxtoolbox.com/SuperTool.aspx before sending.
SendGrid API integration:
// lib/email/sendgrid.ts
import sgMail from '@sendgrid/mail';
sgMail.setApiKey(process.env.SENDGRID_API_KEY!);
export async function sendEmail(params: {
to: string;
subject: string;
html: string;
text: string;
}) {
await sgMail.send({
to: params.to,
from: { email: '[email protected]', name: 'My Store' },
subject: params.subject,
html: params.html,
text: params.text,
trackingSettings: {
clickTracking: { enable: false }, // Don't wrap links in transactional emails
openTracking: { enable: true },
},
});
}
Build templates with React Email (npm install @react-email/components):
// emails/order-confirmation.tsx
import { Body, Container, Heading, Html, Img, Preview, Section, Text, Row, Column } from '@react-email/components';
export function OrderConfirmationEmail({ orderNumber, customerName, items, total, trackingUrl }) {
return (
<Html>
<Preview>Your order #{orderNumber} is confirmed</Preview>
<Body style={{ backgroundColor: '#f4f4f4', fontFamily: 'Arial, sans-serif' }}>
<Container style={{ maxWidth: '600px', margin: '0 auto', backgroundColor: '#fff', padding: '20px' }}>
<Heading>Order Confirmed</Heading>
<Text>Hi {customerName}, your order #{orderNumber} has been received.</Text>
{items.map((item, i) => (
<Row key={i} style={{ borderBottom: '1px solid #eee', padding: '10px 0' }}>
<Column style={{ width: '60px' }}>
<Img src={item.imageUrl} width={50} height={50} alt={item.name} />
</Column>
<Column>
<Text style={{ margin: 0, fontWeight: 'bold' }}>{item.name}</Text>
<Text style={{ margin: 0, color: '#666' }}>Qty: {item.quantity}</Text>
</Column>
<Column style={{ textAlign: 'right' }}>
<Text style={{ margin: 0 }}>{item.price}</Text>
</Column>
</Row>
))}
<Section style={{ marginTop: '20px' }}>
<Text style={{ fontWeight: 'bold', fontSize: '18px' }}>Total: {total}</Text>
</Section>
</Container>
</Body>
</Html>
);
}
Render and send:
import { render } from '@react-email/render';
import { OrderConfirmationEmail } from '../../emails/order-confirmation';
import { sendEmail } from './sendgrid';
export async function sendOrderConfirmation(order: Order) {
const html = await render(OrderConfirmationEmail({ ...orderData }));
const text = await render(OrderConfirmationEmail({ ...orderData }), { plainText: true });
await sendEmail({
to: order.customer.email,
subject: `Your order #${order.number} is confirmed`,
html,
text,
});
}
Handle bounces and complaints via webhook:
// POST /api/webhooks/sendgrid
export async function POST(req: NextRequest) {
const events = await req.json();
for (const event of events) {
if (event.event === 'bounce') {
await db.emailSuppressions.upsert({ email: event.email, type: 'hard_bounce' });
}
if (event.event === 'spamreport') {
await db.emailSuppressions.upsert({ email: event.email, type: 'spam_complaint' });
}
}
return NextResponse.json({ received: true });
}
// Check suppression list before every send
export async function canSendEmail(email: string): Promise<boolean> {
const suppression = await db.emailSuppressions.findByEmail(email.toLowerCase());
return !suppression; // Never send to hard bounced or spam-complaint addresses
}
{ plainText: true }| Problem | Solution |
|---------|----------|
| WooCommerce emails going to spam | Install FluentSMTP to send via SendGrid or SES; WordPress's default PHP mail has no SPF/DKIM and almost always gets marked as spam |
| SES sandbox blocking delivery | New AWS accounts start in SES sandbox mode — request production access via AWS Support before going live |
| Duplicate order confirmation emails | Implement idempotent sending: emailId = hash(orderId + 'order-confirmation') and check before sending |
| Emails landing in spam despite SPF/DKIM | Check DMARC alignment; your From: domain must match the domain in the DKIM d= tag |
| React Email CSS broken in Outlook | Use inline styles for everything; Outlook ignores <style> blocks; @react-email/components handles this for built-in components |
tools
Let shoppers save products to a wishlist, share it with friends, and get notified when saved items come back in stock or drop in price
development
Build a themeable storefront with design tokens and CSS custom properties that supports white-labeling, multi-brand variants, and dark mode
development
Speed up product discovery with instant search suggestions, fuzzy typo matching, and category-aware results powered by Algolia or Elasticsearch
development
Build a mobile-first storefront with thumb-friendly navigation, sticky add-to-cart buttons, and touch-optimized components for high mobile conversion