import { type BlockExecutor } from '../orchestration-schema.js'; export declare const maxEmailHtmlBytes: number; export declare const maxEmailSubjectLength = 255; export declare const defaultEmailSubject = "\u6765\u81EA Mokelay \u7684\u9875\u9762"; /** * @serverBlockDoc * { * "version": 1, * "functionName": "sendEmail", * "displayName": "发送 HTML 邮件", * "category": "communication", * "description": "通过 SMTP 向单个邮箱地址发送 HTML 邮件。", * "inputs": [ * { "key": "to", "type": "string", "required": true, "description": "单个收件邮箱地址。" }, * { "key": "html", "type": "string", "required": true, "description": "HTML 邮件正文,最大 5MB。" }, * { "key": "subject", "type": "string", "required": false, "defaultValue": "来自 Mokelay 的页面", "description": "邮件主题,最大 255 个字符且不能包含换行。" } * ], * "outputs": [ * { "key": "messageId", "type": "string", "description": "SMTP provider 返回的邮件 ID。" }, * { "key": "accepted", "type": "string[]", "description": "SMTP 接受的收件地址。" }, * { "key": "rejected", "type": "string[]", "description": "SMTP 拒绝的收件地址。" } * ], * "errors": [ * { "code": "BLOCK_EMAIL_INPUT_INVALID", "description": "收件地址、HTML 或主题无效。" }, * { "code": "BLOCK_EMAIL_CONFIG_MISSING", "description": "SMTP 环境配置缺失或无效。" }, * { "code": "BLOCK_EMAIL_SEND_FAILED", "description": "SMTP 认证、网络或投递失败。" } * ], * "config": [ * { "key": "SMTP_HOST", "type": "string", "required": true, "description": "SMTP 主机。" }, * { "key": "SMTP_PORT", "type": "number", "required": true, "description": "SMTP 端口。" }, * { "key": "SMTP_USER", "type": "string", "required": true, "description": "SMTP 用户名。" }, * { "key": "SMTP_PASS", "type": "string", "required": true, "description": "SMTP 密码或应用专用密码。" }, * { "key": "SMTP_SECURE", "type": "boolean", "required": false, "description": "是否启用隐式 TLS;未配置时端口 465 自动启用。" }, * { "key": "SMTP_FROM", "type": "string", "required": false, "description": "发件人,默认 SMTP_USER。" } * ], * "runtime": [ * { "key": "requiresDatasource", "type": "boolean", "value": false, "description": "不需要数据库连接。" }, * { "key": "network", "type": "string", "value": "SMTP", "description": "会连接外部 SMTP 服务。" }, * { "key": "sideEffect", "type": "string", "value": "send-email", "description": "执行后会真实发送邮件。" } * ], * "examples": [ * { "title": "发送页面邮件", "block": { "uuid": "send_email", "functionName": "sendEmail", "inputs": { "to": "user@example.com", "html": { "template": "{{blocks['render_page'].outputs.html}}" } }, "outputs": ["messageId", "accepted", "rejected"], "nextBlock": null } } * ] * } */ export declare const executeSendEmailBlock: BlockExecutor;