Email Design
Design high-converting marketing emails with AI-generated visuals via inference.sh CLI.
Quick Start
CODEBLOCK0
Install note: The install script only detects your OS/architecture, downloads the matching binary from dist.inference.sh, and verifies its SHA-256 checksum. No elevated permissions or background processes. Manual install & verification available.
Email Width & Layout
| Constraint | Value | Why |
|---|
| Max width | 600px | Gmail, Outlook rendering standard |
| Mobile width |
320-414px | Responsive fallback |
|
Single column | Preferred | Better mobile rendering |
|
Two column | Use sparingly | Breaks on many clients |
|
Image width | 600px max, 300px for 2-col | Retina: provide 2x (1200px) |
|
Font size (body) | 14-16px | Below 14px is hard to read on mobile |
|
Font size (heading) | 22-28px | Must be scannable |
|
Line height | 1.5 | Readability on all devices |
The Inverted Pyramid Layout
The most effective email layout funnels attention to a single CTA:
CODEBLOCK1
Subject Lines
Formulas That Work
| Formula | Example | Open Rate Impact |
|---|
| Number + benefit | "5 ways to cut your build time in half" | High |
| Question |
"Are you still deploying on Fridays?" | High |
| How-to | "How to automate your reports in 3 steps" | Medium-High |
| Urgency (genuine) | "Last day: 30% off annual plans" | High (if real) |
| Personalized | "[Name], your weekly report is ready" | Very High |
| Curiosity gap | "The one feature our users can't stop talking about" | Medium-High |
Rules
| Rule | Value |
|---|
| Length | 30-50 characters (mobile truncates at ~35) |
| Preview text |
First 40-100 chars after subject — design this intentionally |
|
Emoji | Max 1, at start or end, test with your audience |
|
ALL CAPS | Never — triggers spam filters |
|
Spam trigger words | Avoid: "free", "act now", "limited time", "click here" in subject |
|
Personalization | [First name] in subject lifts open rates 20%+ |
Preview Text
The preview text appears after the subject line in the inbox. Don't waste it.
CODEBLOCK2
Email Types
Welcome Email (Automated, Day 0)
| Element | Content |
|---|
| Subject | "Welcome to [Product] — here's what's next" |
| Header |
Brand image or product screenshot |
| Body | 3-4 sentences: what they signed up for, what to expect, one quick win |
| CTA | "Complete your setup" or "Try your first [action]" |
| Timing | Immediately after signup |
Promotional / Campaign
| Element | Content |
|---|
| Subject | Benefit-focused, urgency if real |
| Header |
Hero image showing the offer/outcome |
| Body | Problem → solution → offer → deadline |
| CTA | "Get 30% Off" or "Start Free Trial" |
| Urgency | Real deadline, not fake scarcity |
Product Update / Changelog
| Element | Content |
|---|
| Subject | "New: [Feature name] is here" |
| Header |
Screenshot or visual of the feature |
| Body | What's new, why it matters, how to use it |
| CTA | "Try [feature]" |
Transactional (Receipts, Confirmations)
| Rule | Why |
|---|
| Clear purpose in subject | "Your order #1234 is confirmed" |
| Minimal design |
Don't confuse with marketing |
| Key info above the fold | Order number, amount, date |
| No promotional content (mostly) | CAN-SPAM allows some, but keep minimal |
Header Image Design
CODEBLOCK3
CTA Buttons
| Rule | Value |
|---|
| Width | 200-300px, not full width |
| Height |
44-50px minimum (tap target) |
|
Color | High contrast with background |
|
Text | Action verb + outcome: "Start Free Trial" |
|
Shape | Rounded corners (4-8px border-radius) |
|
Placement | Above the fold, repeated at bottom for long emails |
|
Quantity | ONE primary CTA per email |
Bulletproof Buttons
HTML buttons render differently across email clients. Use the "bulletproof button" technique (VML for Outlook, HTML/CSS for everything else):
CODEBLOCK4
Mobile Optimization
| Rule | Why |
|---|
| Single column layout | Multi-column breaks on mobile |
| Font minimum 14px |
Smaller is unreadable |
| CTA button minimum 44px tall | Apple/Android tap target |
| Images scale to 100% width | Prevent horizontal scroll |
| Stack elements vertically | Side-by-side breaks on narrow screens |
| Test on Gmail app, Apple Mail, Outlook | The big 3 email clients |
60%+ of emails are opened on mobile. Design mobile-first.
Deliverability Checklist
| Factor | Rule |
|---|
| Image-to-text ratio | Max 40% images, 60% text (spam filters flag image-heavy emails) |
| Alt text on images |
Always — images blocked by default in many clients |
| Unsubscribe link | Required by law (CAN-SPAM, GDPR) — make it easy to find |
| From name | Recognizable person or brand name |
| Reply-to | Real address, not no-reply@ (hurts deliverability) |
| List hygiene | Remove bounces, clean inactive subscribers quarterly |
| SPF/DKIM/DMARC | Technical authentication — set up once, critical for inbox |
Common Mistakes
| Mistake | Problem | Fix |
|---|
| No preview text | Shows "View in browser" or random code | Set preview text intentionally |
| Image-only emails |
Blocked images = blank email + spam risk | 60%+ text, alt text on images |
| Multiple CTAs | Decision paralysis, lower click rate | One primary CTA per email |
| Tiny text | Unreadable on mobile | Minimum 14px body, 22px headings |
| no-reply@ sender | Hurts deliverability, feels impersonal | Use real reply address |
| No mobile testing | Broken layout for 60%+ of readers | Test on Gmail app + Apple Mail |
| Missing unsubscribe | Illegal (CAN-SPAM) + spam complaints | Clear unsubscribe link in footer |
| Over-designing | Email clients render CSS inconsistently | Simple layouts, inline styles |
| Fake urgency | Erodes trust, trains users to ignore | Only use real deadlines |
Related Skills
CODEBLOCK5
Browse all apps: INLINECODE1
邮件设计
通过 inference.sh CLI 使用 AI 生成的视觉元素,设计高转化率的营销邮件。
快速开始
bash
curl -fsSL https://cli.inference.sh | sh && infsh login
生成邮件头部横幅
infsh app run infsh/html-to-image --input {
html:
}
安装说明: 安装脚本仅检测您的操作系统/架构,从 dist.inference.sh 下载匹配的二进制文件,并验证其 SHA-256 校验和。无需提升权限或后台进程。提供手动安装与验证方式。
邮件宽度与布局
| 约束条件 | 数值 | 原因 |
|---|
| 最大宽度 | 600px | Gmail、Outlook 渲染标准 |
| 移动端宽度 |
320-414px | 响应式回退方案 |
|
单列布局 | 首选 | 移动端渲染效果更佳 |
|
双列布局 | 谨慎使用 | 在许多客户端上会出错 |
|
图片宽度 | 最大600px,双列时300px | Retina 屏需提供2倍图(1200px) |
|
正文字号 | 14-16px | 小于14px在移动端难以阅读 |
|
标题字号 | 22-28px | 必须便于快速浏览 |
|
行高 | 1.5 | 确保在所有设备上的可读性 |
倒金字塔布局
最高效的邮件布局将注意力集中到单个行动号召按钮:
┌──────────────────────────────────┐
│ 头部图片 │ ← 品牌/视觉吸引点
│ (600 x 200-300) │
├──────────────────────────────────┤
│ │
│ 标题(一行) │ ← 关于什么内容
│ │
│ 2-3句正文说明 │ ← 为什么与我相关
│ 价值主张。 │
│ │
│ ┌──────────────┐ │
│ │ 行动号召按钮 │ │ ← 一个明确的行动
│ └──────────────┘ │
│ │
├──────────────────────────────────┤
│ 页脚:取消订阅链接 │
└──────────────────────────────────┘
邮件主题行
有效的公式
| 公式 | 示例 | 打开率影响 |
|---|
| 数字 + 利益 | 将构建时间减半的5种方法 | 高 |
| 提问式 |
你还在周五部署吗? | 高 |
| 操作指南 | 如何在3步内自动化你的报告 | 中高 |
| 紧迫感(真实) | 最后一天:年度计划7折 | 高(如真实) |
| 个性化 | [姓名],你的周报已就绪 | 非常高 |
| 好奇心缺口 | 用户们热议的一个功能 | 中高 |
规则
| 规则 | 数值 |
|---|
| 长度 | 30-50个字符(移动端约35个字符后截断) |
| 预览文本 |
主题行后的前40-100个字符——需精心设计 |
|
表情符号 | 最多1个,放在开头或结尾,需对受众进行测试 |
|
全大写 | 绝不使用——会触发垃圾邮件过滤器 |
|
垃圾邮件触发词 | 避免在主题行中使用:免费、立即行动、限时、点击这里 |
|
个性化 | 主题行中使用[名字]可提升打开率20%以上 |
预览文本
预览文本出现在收件箱中主题行之后。不要浪费这个空间。
❌ 在浏览器中查看此邮件(默认,浪费空间)
❌ 无法正常查看?(没人关心)
✅ 主题行:5种减少构建时间的方法
预览文本:第3种方法每周为我们节省了6小时
✅ 主题行:你的月度报告已就绪
预览文本:收入增长23%——以下是驱动因素
邮件类型
欢迎邮件(自动化,第0天)
| 元素 | 内容 |
|---|
| 主题行 | 欢迎使用[产品]——接下来请这样做 |
| 头部 |
品牌图片或产品截图 |
| 正文 | 3-4句话:他们注册了什么、可以期待什么、一个快速上手技巧 |
| 行动号召 | 完成设置或尝试你的第一个[操作] |
| 发送时机 | 注册后立即发送 |
促销/活动邮件
展示优惠/成果的主视觉图片 |
| 正文 | 问题 → 解决方案 → 优惠 → 截止日期 |
| 行动号召 | 获取7折优惠或开始免费试用 |
| 紧迫感 | 真实截止日期,而非虚假稀缺 |
产品更新/更新日志
功能截图或视觉展示 |
| 正文 | 新功能是什么、为什么重要、如何使用 |
| 行动号召 | 尝试[功能] |
事务性邮件(收据、确认函)
| 规则 | 原因 |
|---|
| 主题行中明确目的 | 您的订单#1234已确认 |
| 极简设计 |
不要与营销邮件混淆 |
| 关键信息在首屏 | 订单号、金额、日期 |
| 尽量不包含促销内容 | CAN-SPAM允许少量,但保持最小化 |
头部图片设计
bash
欢迎邮件头部
infsh app run infsh/html-to-image --input {
html:
}
促销/活动头部
infsh app run infsh/html-to-image --input {
html:
}
功能公告头部(含AI视觉元素)
infsh app run falai/flux-dev-lora --input {
prompt: 干净现代的邮件头部横幅,抽象流动的数据可视化,深蓝色渐变背景,微弱的发光节点和连接,科技美学,极简,无文字,等效600x250,
width: 1200,
height: 500
}
行动号召按钮
最小44-50px(触控目标) |
|
颜色 | 与背景高对比度 |
|
文本 | 动作动词 + 结果:开始免费试用 |
|
形状 | 圆角(border-radius: 4-8px) |
|
位置 | 首屏