Install
openclaw skills install aliyun-mailA skill to send emails via Aliyun enterprise email service with support for markdown, HTML text, attachments, and syntax highlighting for code blocks.
openclaw skills install aliyun-mailThis 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.
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
aliyun-mail send --to "recipient@example.com" --subject "Hello" --body "This is a plain text email"
aliyun-mail send \
--to "recipient@example.com" \
--subject "Code Report" \
--body "**Check out this Python code:**\n\n```python\nprint('Hello World')\n```" \
--markdown
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"
aliyun-mail send \
--to "recipient@example.com" \
--subject "Report from File" \
--body-file "/path/to/report.md" \
--markdown \
--attachments "/path/to/data.csv"
--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 attachThe 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.