Send Email
send_emailSend plain-text or HTML emails through the WeCom official mail API. The sender is fixed to the current app mailbox; set content_type=html for compatible HTML content.
Instructions
通过企业微信官方邮件 API 发送普通邮件。发件人固定为当前应用邮箱账号。如果发送 HTML 邮件,请显式传 content_type=html,并只使用邮件兼容写法:优先用 table/tbody/tr/td 做布局,样式尽量写 inline style。稳定标签:table、tbody、tr、td、p、br、span、strong、b、em、i、h1-h4、a、img。避免 script、iframe、form、video、audio、canvas、svg、外链 CSS、flex、grid、position、web font、相对路径和网页式复杂模板。图片请使用公网 https 绝对地址。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | 邮件正文。如果发送 HTML 邮件,请显式传 content_type=html,并只使用邮件兼容写法:优先用 table/tbody/tr/td 做布局,样式尽量写 inline style。稳定标签:table、tbody、tr、td、p、br、span、strong、b、em、i、h1-h4、a、img。避免 script、iframe、form、video、audio、canvas、svg、外链 CSS、flex、grid、position、web font、相对路径和网页式复杂模板。图片请使用公网 https 绝对地址。HTML 骨架建议:<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td><h2 style="margin:0 0 16px;">标题</h2><p style="margin:0 0 12px;">正文</p><a href="https://example.com">链接</a><img src="https://example.com/demo.png" alt="" style="display:block;width:100%;height:auto;border:0;"></td></tr></table> | |
| subject | Yes | 邮件主题 | |
| to_email | Yes | 收件人邮箱地址,例如 user@example.com | |
| content_type | No | 正文类型。支持 text、html、text/plain、text/html。默认 text。如果正文是 HTML,请显式传 html 或 text/html,并遵守邮件兼容 HTML 限制。 | text |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| message | No | 邮件已通过企业微信官方邮件 API 发送。 | |
| subject | Yes | ||
| provider | No | wecom | |
| to_email | Yes | ||
| content_type | Yes | ||
| sender_email | Yes |