gog-html-email
Enhanced HTML email formatting for gog CLI with ready-to-use templates.
How to Send HTML Emails
ALWAYS use this exact workflow:
- 1. Read the appropriate template file from INLINECODE0
- Replace placeholders using
sed commands - Send via INLINECODE2
Example:
CODEBLOCK0
For multi-paragraph messages:
CODEBLOCK1
DO NOT:
- - Manually construct HTML strings
- Use heredocs or multi-line strings
- Include literal
\n characters in HTML - Put multiple paragraphs in a single
<p> tag
Template Selection Guide
Choose the right template based on the email purpose:
Business/Professional:
- -
basic.html - Simple professional emails - INLINECODE6 - Meeting invitations (requires: NAME, TOPIC, DATE, TIME, DURATION, LOCATION, SIGNATURE)
- INLINECODE7 - Follow-up emails
- INLINECODE8 - Project updates
- INLINECODE9 - Invoices and payments
- INLINECODE10 - Emails with call-to-action buttons
- INLINECODE11 - Newsletters
Islamic/Religious:
- -
jummah.html - Friday greetings (Jummah Mubarak) - INLINECODE13 - Eid celebrations (Eid Mubarak)
- INLINECODE14 - Ramadan greetings (Ramadan Mubarak)
Celebrations:
- -
birthday.html - Birthday wishes - INLINECODE16 - Anniversary wishes
- INLINECODE17 - Congratulations messages
- INLINECODE18 - New Year wishes (requires: NAME, MESSAGE, YEAR, SIGNATURE)
Other:
- -
welcome.html - Welcome new users - INLINECODE20 - Thank you messages
- INLINECODE21 - Important announcements
- INLINECODE22 - Long-form content
HTML Template Files
All templates are available in the templates/ directory. Each template uses placeholder variables in [BRACKETS] that you can replace with actual content.
Available Templates
- 1. basic.html - Simple professional email
- Placeholders:
[NAME],
[MESSAGE], INLINECODE27
- 2. highlight.html - Email with highlighted box
- Placeholders:
[NAME],
[HIGHLIGHT_MESSAGE],
[MESSAGE], INLINECODE31
- 3. button.html - Email with call-to-action button
- Placeholders:
[NAME],
[MESSAGE],
[BUTTON_URL],
[BUTTON_TEXT], INLINECODE36
- 4. multi-paragraph.html - Multiple paragraph email
- Placeholders:
[NAME],
[PARAGRAPH_1],
[PARAGRAPH_2],
[PARAGRAPH_3], INLINECODE41
- 5. meeting.html - Meeting invitation
- Placeholders:
[NAME],
[TOPIC],
[DATE],
[TIME],
[DURATION],
[LOCATION], INLINECODE48
- 6. follow-up.html - Follow-up email
- Placeholders:
[NAME],
[TOPIC],
[MESSAGE], INLINECODE52
- 7. newsletter.html - Newsletter format
- Placeholders:
[NEWSLETTER_TITLE],
[DATE],
[SECTION_1_TITLE],
[SECTION_1_CONTENT],
[SECTION_2_TITLE], INLINECODE58
- 8. invoice.html - Invoice notification
- Placeholders:
[NAME],
[INVOICE_NUMBER],
[DATE],
[AMOUNT],
[DUE_DATE],
[DESCRIPTION],
[PAYMENT_URL], INLINECODE66
- 9. welcome.html - Welcome email with CTA
- Placeholders:
[NAME],
[MESSAGE],
[GET_STARTED_URL], INLINECODE70
- 10. status-update.html - Project status update
- Placeholders:
[NAME],
[PROJECT_NAME],
[COMPLETED_ITEMS],
[IN_PROGRESS_ITEMS],
[BLOCKED_ITEMS],
[NEXT_STEPS], INLINECODE77
Special Occasion Templates
- 11. jummah.html - Jummah Mubarak greeting
- Placeholders:
[NAME],
[MESSAGE],
[SIGNATURE]
- Features: Islamic greeting with blue gradient background
- 12. eid.html - Eid Mubarak greeting
- Placeholders:
[NAME],
[MESSAGE],
[SIGNATURE]
- Features: Green gradient background with Islamic blessings
- 13. ramadan.html - Ramadan Mubarak greeting
- Placeholders:
[NAME],
[MESSAGE],
[SIGNATURE]
- Features: Purple gradient background with Ramadan wishes
- 14. birthday.html - Birthday wishes
- Placeholders:
[NAME],
[MESSAGE],
[SIGNATURE]
- Features: Pink gradient background with celebration emojis
- 15. anniversary.html - Anniversary wishes
- Placeholders:
[NAME],
[MESSAGE],
[SIGNATURE]
- Features: Pink-yellow gradient with romantic theme
- 16. congratulations.html - Congratulations message
- Placeholders:
[NAME],
[MESSAGE],
[SIGNATURE]
- Features: Gold-blue gradient with success theme
- 17. thank-you.html - Thank you message
- Placeholders:
[NAME],
[MESSAGE],
[SIGNATURE]
- Features: Soft pastel gradient with gratitude theme
- 18. new-year.html - New Year wishes
- Placeholders:
[NAME],
[MESSAGE],
[YEAR],
[SIGNATURE]
- Features: Purple gradient with celebration theme
Using Templates Directly
CODEBLOCK2
Quick Examples
Basic email:
CODEBLOCK3
Meeting invitation:
CODEBLOCK4
Email with button:
CODEBLOCK5
Jummah Mubarak:
CODEBLOCK6
Eid Mubarak:
CODEBLOCK7
Birthday wishes:
CODEBLOCK8
Best Practices
- 1. Use template files - All templates are pre-formatted and tested
- Single-line HTML - Templates are already single-line to avoid formatting issues
- Inline CSS - All templates use inline styles for email client compatibility
- Max Width - Templates are set to 600px for optimal viewing
- System Fonts - Templates use
-apple-system, BlinkMacSystemFont, Segoe UI, Roboto for best rendering - Test First - Send to yourself before sending to recipients
- Replace all placeholders - Make sure to replace all
[PLACEHOLDER] values with actual content
Customizing Templates
You can customize template colors, fonts, and styling by adding additional sed commands to replace CSS values.
Common Customizations
Change gradient colors:
CODEBLOCK9
Change primary color:
CODEBLOCK10
Change background color:
CODEBLOCK11
Change font size:
CODEBLOCK12
Change layout alignment (left-align instead of center):
CODEBLOCK13
Color Palette Reference
Current template colors:
Birthday (Pink):
- - Gradient:
#f093fb → INLINECODE107 - Heading: INLINECODE108
Eid (Green):
- - Gradient:
#11998e → INLINECODE110 - Heading: INLINECODE111
Jummah (Blue):
- - Gradient:
#4facfe → INLINECODE113 - Heading: INLINECODE114
Ramadan (Purple):
- - Gradient:
#667eea → INLINECODE116 - Heading: INLINECODE117
Anniversary (Pink-Yellow):
- - Gradient:
#fa709a → INLINECODE119 - Heading: INLINECODE120
Congratulations (Gold-Blue):
- - Gradient:
#ffd89b → INLINECODE122 - Heading: INLINECODE123
Thank You (Pastel):
- - Gradient:
#a8edea → INLINECODE125
New Year (Purple):
- - Gradient:
#667eea → INLINECODE127 - Heading: INLINECODE128
Suggested alternative palettes:
- - Ocean:
#2E3192 → INLINECODE130 - Sunset:
#FF512F → INLINECODE132 - Forest:
#134E5E → INLINECODE134 - Royal:
#8E2DE2 → INLINECODE136 - Warm:
#FF6B6B → INLINECODE138 - Cool:
#4ECDC4 → INLINECODE140
Advanced Customization
Multiple color changes:
CODEBLOCK14
Create custom template variant:
CODEBLOCK15
Notes
- - Templates are single-line HTML to prevent formatting issues
- For complex layouts (tables, multiple sections), create a custom template file
- Always test HTML emails in multiple clients (Gmail, Outlook, Apple Mail)
- Use plain text (
--body) for simple messages without formatting needs
gog-html-email
为gog CLI增强的HTML邮件格式化功能,附带可直接使用的模板。
如何发送HTML邮件
始终使用以下精确工作流程:
- 1. 从 workspace/skills/gog-html-email/templates/ 读取合适的模板文件
- 使用 sed 命令替换占位符
- 通过 gog gmail send --body-html 发送
示例:
bash
TEMPLATE=$(cat workspace/skills/gog-html-email/templates/basic.html)
HTML=$(echo $TEMPLATE | sed s/\[NAME\]/John/g | sed s/\[MESSAGE\]/Your message here/g | sed s/\[SIGNATURE\]/Your Name/g)
gog gmail send --to recipient@example.com --subject Subject --body-html $HTML
对于多段落消息:
bash
TEMPLATE=$(cat workspace/skills/gog-html-email/templates/basic.html)
用多个
标签替换[MESSAGE]以获得合适的间距
MESSAGE=
First paragraph.
Second paragraph.
Third paragraph.
HTML=$(echo $TEMPLATE | sed s|\[MESSAGE\]|$MESSAGE|g | sed s/\[NAME\]/John/g | sed s/\[SIGNATURE\]/Your Name/g)
gog gmail send --to recipient@example.com --subject Subject --body-html $HTML
不要:
- - 手动构建HTML字符串
- 使用heredocs或多行字符串
- 在HTML中包含字面量 \n 字符
- 将多个段落放在单个
标签中
模板选择指南
根据邮件目的选择合适的模板:
商务/专业:
- - basic.html - 简单的专业邮件
- meeting.html - 会议邀请(需要:NAME, TOPIC, DATE, TIME, DURATION, LOCATION, SIGNATURE)
- follow-up.html - 跟进邮件
- status-update.html - 项目更新
- invoice.html - 发票和付款
- button.html - 带行动号召按钮的邮件
- newsletter.html - 新闻通讯
伊斯兰/宗教:
- - jummah.html - 周五问候(主麻吉庆)
- eid.html - 开斋节庆祝(开斋节吉庆)
- ramadan.html - 斋月问候(斋月吉庆)
庆祝活动:
- - birthday.html - 生日祝福
- anniversary.html - 周年纪念祝福
- congratulations.html - 祝贺消息
- new-year.html - 新年祝福(需要:NAME, MESSAGE, YEAR, SIGNATURE)
其他:
- - welcome.html - 欢迎新用户
- thank-you.html - 感谢消息
- highlight.html - 重要公告
- multi-paragraph.html - 长格式内容
HTML模板文件
所有模板均位于 templates/ 目录中。每个模板使用 [方括号] 中的占位符变量,您可以用实际内容替换。
可用模板
- 1. basic.html - 简单的专业邮件
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 2. highlight.html - 带高亮框的邮件
- 占位符:[NAME], [HIGHLIGHT_MESSAGE], [MESSAGE], [SIGNATURE]
- 3. button.html - 带行动号召按钮的邮件
- 占位符:[NAME], [MESSAGE], [BUTTON
URL], [BUTTONTEXT], [SIGNATURE]
- 4. multi-paragraph.html - 多段落邮件
- 占位符:[NAME], [PARAGRAPH
1], [PARAGRAPH2], [PARAGRAPH_3], [SIGNATURE]
- 5. meeting.html - 会议邀请
- 占位符:[NAME], [TOPIC], [DATE], [TIME], [DURATION], [LOCATION], [SIGNATURE]
- 6. follow-up.html - 跟进邮件
- 占位符:[NAME], [TOPIC], [MESSAGE], [SIGNATURE]
- 7. newsletter.html - 新闻通讯格式
- 占位符:[NEWSLETTER
TITLE], [DATE], [SECTION1
TITLE], [SECTION1
CONTENT], [SECTION2
TITLE], [SECTION2_CONTENT]
- 8. invoice.html - 发票通知
- 占位符:[NAME], [INVOICE
NUMBER], [DATE], [AMOUNT], [DUEDATE], [DESCRIPTION], [PAYMENT_URL], [SIGNATURE]
- 9. welcome.html - 带CTA的欢迎邮件
- 占位符:[NAME], [MESSAGE], [GET
STARTEDURL], [SIGNATURE]
- 10. status-update.html - 项目状态更新
- 占位符:[NAME], [PROJECT
NAME], [COMPLETEDITEMS], [IN
PROGRESSITEMS], [BLOCKED
ITEMS], [NEXTSTEPS], [SIGNATURE]
特殊场合模板
- 11. jummah.html - 主麻吉庆问候
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 特点:蓝色渐变背景的伊斯兰问候
- 12. eid.html - 开斋节吉庆问候
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 特点:绿色渐变背景配伊斯兰祝福
- 13. ramadan.html - 斋月吉庆问候
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 特点:紫色渐变背景配斋月祝福
- 14. birthday.html - 生日祝福
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 特点:粉色渐变背景配庆祝表情符号
- 15. anniversary.html - 周年纪念祝福
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 特点:粉黄渐变配浪漫主题
- 16. congratulations.html - 祝贺消息
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 特点:金蓝渐变配成功主题
- 17. thank-you.html - 感谢消息
- 占位符:[NAME], [MESSAGE], [SIGNATURE]
- 特点:柔和粉彩渐变配感恩主题
- 18. new-year.html - 新年祝福
- 占位符:[NAME], [MESSAGE], [YEAR], [SIGNATURE]
- 特点:紫色渐变配庆祝主题
直接使用模板
bash
读取模板,替换占位符,然后发送
TEMPLATE=$(cat workspace/skills/gog-html-email/templates/basic.html)
HTML=$(echo $TEMPLATE | sed s/\[NAME\]/John/g | sed s/\[MESSAGE\]/Your message here/g | sed s/\[SIGNATURE\]/Your Name/g)
gog gmail send --to recipient@example.com --subject Subject --body-html $HTML
快速示例
基本邮件:
bash
TEMPLATE=$(cat workspace/skills/gog-html-email/templates/basic.html)
HTML=$(echo $TEMPLATE | sed s/\[NAME\]/John/g | sed s/\[MESSAGE\]/Just wanted to check in on the project status./g | sed s/\[SIGNATURE\]/Sarah/g)
gog gmail send --to john@example.com --subject Project Check-in --body-html $HTML
会议邀请: