← 返回
沟通协作 Key 中文

Aliyun Mail

A skill to send emails via Aliyun enterprise email service with support for markdown, HTML text, attachments, and syntax highlighting for code blocks.
通过阿里云企业邮箱发送邮件,支持Markdown、HTML、附件和代码块语法高亮。
jixsonwang
沟通协作 clawhub v1.0.0 1 版本 99725.1 Key: 需要
★ 0
Stars
📥 1,451
下载
💾 50
安装
1
版本
#latest

概述

Aliyun Mail Skill

This skill enables sending emails through Aliyun enterprise email service with advanced features including Markdown conversion, HTML styling, file attachments, and syntax highlighting for code blocks.

Features

  • Aliyun Enterprise Email Support: Optimized for Aliyun's SMTP service (smtp.mxhichina.com)
  • Multiple Content Types: Send plain text, Markdown, or HTML emails
  • Markdown with Syntax Highlighting: Automatic syntax highlighting for code blocks in Markdown
  • File Attachments: Include one or more files as attachments
  • Configuration-based: Uses a secure configuration file for SMTP credentials
  • Error Handling: Includes retry logic and detailed error reporting

Prerequisites

  • SMTP Configuration File: Create aliyun-mail-config.json in your OpenClaw config directory (/root/.openclaw/)

Example configuration file:

{
  "server": "smtp.mxhichina.com",
  "port": 465,
  "username": "your-email@yourdomain.com",
  "password": "your-app-password",
  "emailFrom": "your-email@yourdomain.com",
  "useTLS": true
}

Ensure the configuration file has secure permissions:

chmod 600 /root/.openclaw/aliyun-mail-config.json

Usage

Basic Text Email

aliyun-mail send --to "recipient@example.com" --subject "Hello" --body "This is a plain text email"

Markdown Email with Syntax Highlighting

aliyun-mail send \
  --to "recipient@example.com" \
  --subject "Code Report" \
  --body "**Check out this Python code:**\n\n```python\nprint('Hello World')\n```" \
  --markdown

HTML Email with Attachment

aliyun-mail send \
  --to "recipient@example.com" \
  --subject "Weekly Report" \
  --body "<h1>Weekly Report</h1><p>See attached file.</p>" \
  --html \
  --attachments "/path/to/report.pdf"

Using Body from File

aliyun-mail send \
  --to "recipient@example.com" \
  --subject "Report from File" \
  --body-file "/path/to/report.md" \
  --markdown \
  --attachments "/path/to/data.csv"

Command Line Options

  • --to: Recipient email address (required)
  • --subject: Email subject (required)
  • --body: Email body content (required if --body-file not provided)
  • --body-file: Path to file containing email body
  • --html: Send as HTML email (default: plain text)
  • --markdown: Send as Markdown email with syntax highlighting
  • --attachments: Space-separated list of file paths to attach

Error Handling

The tool includes robust error handling with up to 3 retry attempts on failure. Network issues, authentication errors, and invalid email addresses are reported with detailed error messages.

Security Notes

  • Always use app-specific passwords rather than your main email password
  • Keep the configuration file secure with proper file permissions
  • Never commit configuration files to version control

Future Enhancements

  • Support for CC/BCC recipients
  • Email templates system
  • Scheduled email sending
  • Rich text editor integration

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 00:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Wechat Search

jixsonwang
使用OpenClaw的网页搜索、Tavily API和网页抓取功能搜索微信公众号文章,采用合规设计。
★ 10 📥 4,559
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,584
communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 113 📥 52,401