算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
html-mailer-builder【设计与创意】Generate professional HTML email templates compatible with Gmail, Outlook, and Apple Mail, using table layouts and inline CSS for responsive design. Triggered by requests for welcome emails, promotional campaigns, password resets, notifications, order confirmations, or any mention of creating EDM, newsletters, or transactional email templates.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate professional HTML email templates fully compatible with Gmail, Outlook, Apple Mail, and other major email clients. Uses table layout + inline CSS to ensure consistent rendering across all clients, with media query-based responsive design for mobile devices.
| Type | Description | Typical Use |
|---|---|---|
welcome | Welcome message with feature highlights and onboarding guide | New user onboarding |
promotional | Promotional campaign with product showcase and discount codes | Marketing campaigns, holiday sales |
password_reset | Clean, secure password reset link | Security transactional emails |
notification | General notification with customizable title and content | System alerts, status updates |
order_confirmation | Order confirmation with item list and price summary | E-commerce transaction confirmations |
Collect the following information from the user:
Create a JSON configuration file based on user requirements. Configuration structures differ by template type.
{
"template_type": "welcome",
"theme": {
"primary_color": "#4A90D9",
"secondary_color": "#2C5282",
"accent_color": "#ED8936",
"bg_color": "#F7FAFC",
"content_bg_color": "#FFFFFF",
"text_color": "#2D3748",
"muted_text_color": "#718096",
"font_family": "Arial, Helvetica, sans-serif",
"max_width": 600,
"border_radius": 8
},
"header": {
"logo_url": "",
"logo_alt": "Company Logo",
"company_name": "MyCompany"
},
"preheader": "Preview text shown in the inbox",
"footer": {
"company": "MyCompany Inc.",
"address": "123 Main Street, San Francisco, CA 94102",
"unsubscribe_url": "#",
"support_email": "support@example.com",
"extra_links": [
{"text": "Website", "url": "https://example.com"}
]
}
}
{
"content": {
"user_name": "John",
"greeting": "Welcome to MyCompany!",
"message": "Thanks for signing up. Here are some features to help you get started.",
"cta_text": "Get Started",
"cta_url": "https://example.com/get-started",
"features": [
{"icon": "📊", "title": "Dashboard", "description": "View key metrics in real time"},
{"icon": "🤝", "title": "Team Collaboration", "description": "Invite team members to work together"},
{"icon": "🔔", "title": "Smart Alerts", "description": "Get notified about important events automatically"}
]
}
}
{
"content": {
"headline": "Summer Sale — Up to 50% Off",
"sub_headline": "Limited-time offer, don't miss out",
"hero_image_url": "https://placehold.co/600x300/EEE/333?text=Sale+Banner",
"products": [
{
"name": "Classic T-Shirt",
"image_url": "https://placehold.co/200x200/EEE/333?text=T-Shirt",
"original_price": "$39.99",
"sale_price": "$19.99",
"url": "https://example.com/product/1"
}
],
"offer_code": "SUMMER50",
"offer_expires": "2026-06-30",
"cta_text": "Shop Now",
"cta_url": "https://example.com/sale"
}
}
{
"content": {
"user_name": "John",
"message": "We received a request to reset your account password. If you didn't make this request, you can safely ignore this email.",
"reset_url": "https://example.com/reset?token=abc123",
"cta_text": "Reset Password",
"expires_in": "24 hours",
"support_email": "support@example.com"
}
}
{
"content": {
"title": "Your Report Is Ready",
"message": "The monthly data report you requested is now available. Click the button below to view it.",
"details": [
{"label": "Report Type", "value": "Monthly Data Summary"},
{"label": "Generated At", "value": "2026-04-14 10:00"},
{"label": "Data Range", "value": "2026-03-01 ~ 2026-03-31"}
],
"cta_text": "View Report",
"cta_url": "https://example.com/reports/202603"
}
}
{
"content": {
"user_name": "John",
"order_number": "ORD-20260414-001",
"order_date": "2026-04-14",
"items": [
{"name": "Wireless Bluetooth Earbuds", "quantity": 1, "price": "$39.99"},
{"name": "Phone Case", "quantity": 2, "price": "$9.99"}
],
"subtotal": "$59.97",
"shipping": "$0.00",
"total": "$59.97",
"shipping_address": "123 Main Street, San Francisco, CA 94102",
"cta_text": "View Order",
"cta_url": "https://example.com/orders/ORD-20260414-001"
}
}
After writing the configuration to a JSON file, run the generation script:
python scripts/generate_email_template.py --input config.json --output email.html
The generated HTML follows these email compatibility best practices:
<table> instead of <div> for Outlook compatibilitystyle attributes@media queries in <style> tags (supports Gmail/Apple Mail/iOS)bgcolor attributes and background-color styleshttps://placehold.co/600x300/EEE/333?text=Your+Image as a placeholder