{"summary":"发送单条邮件。","methods":["post","get"],"schemes":["http","https"],"security":[{"AK":[]}],"operationType":"write","deprecated":false,"systemTags":{"operationType":"none","riskType":"none","chargeType":"paid"},"parameters":[{"name":"AccountName","in":"formData","schema":{"description":"管理控制台中配置的发信地址。","example":"test***@example.net","type":"string","required":true,"docRequired":true}},{"name":"AddressType","in":"formData","schema":{"description":"地址类型。取值：\n\n0：为随机账号\n\n1：为发信地址","example":"1","type":"integer","format":"int32","required":true,"docRequired":true,"maximum":"1","minimum":"0"}},{"name":"TagName","in":"formData","schema":{"description":"在邮件推送控制台创建的标签，用于分类所发送的邮件批次，可以通过标签来查询每批邮件的发送情况，另外如果开启邮件跟踪功能，发信必须使用邮件标签。\n长度为1-128个字符，允许英文字母、数字、_、-","example":"test","type":"string","required":false}},{"name":"ReplyToAddress","in":"formData","schema":{"description":"是否启用管理控制台中配置好回信地址（状态须验证通过），取值范围是字符串true或者false。","example":"true","type":"boolean","required":true,"docRequired":true}},{"name":"ToAddress","in":"formData","schema":{"description":"目标地址，多个 email 地址可以用逗号分隔，最多100个地址（支持邮件组）。","example":"test1***@example.net","type":"string","required":true,"docRequired":true}},{"name":"Subject","in":"formData","schema":{"description":"邮件主题，长度不大于256个字符。","example":"Subject","type":"string","required":true,"docRequired":true}},{"name":"HtmlBody","in":"formData","schema":{"description":"邮件 html 正文。\n\n注意：HtmlBody和TextBody是针对不同类型的邮件内容，两者必须传其一。\n\n- URL传参限制约80KB\n- 新版SDK采用Body传参限制约8MB（\njava 1.4.0及以上，\npython3 1.4.0及以上，\nphp 1.4.0及以上\n）","example":"body","type":"string","required":false}},{"name":"TextBody","in":"formData","schema":{"description":"邮件 text 正文。\n\n注意：HtmlBody和TextBody是针对不同类型的邮件内容，两者必须传其一。\n\n- URL传参限制约80KB\n- 新版SDK采用Body传参限制约8MB（\njava 1.4.0及以上，\npython3 1.4.0及以上，\nphp 1.4.0及以上\n）","example":"body","type":"string","required":false}},{"name":"FromAlias","in":"formData","schema":{"description":"发信人昵称，长度小于15个字符。\n\n例如：发信人昵称设置为”Jane”，发信地址为 test***@example.net，收信人看到的发信地址为“Jane”test***@example.net。","example":"Jane","type":"string","required":false}},{"name":"ReplyAddress","in":"formData","schema":{"description":"回信地址","example":"test2***@example.net","type":"string","required":false}},{"name":"ReplyAddressAlias","in":"formData","schema":{"description":"回信地址昵称","example":"Jane","type":"string","required":false}},{"name":"ClickTrace","in":"formData","schema":{"description":"1：为打开数据跟踪功能\n\n0（默认）：为关闭数据跟踪功能。","example":"0","type":"string","required":false}},{"name":"UnSubscribeLinkType","in":"formData","schema":{"description":"disabled: 不生成\n\ndefault: 采用默认策略：对批量类型的发信地址发给特定域名时会生成退订链接，如带有关键字\"gmail\", \"yahoo\",\n\n\"google\", \"aol.com\", \"hotmail\",\n\n\"outlook\", \"ymail.com\"等，具体参照[退订功能生成链接和过滤机制](~~2689048~~)文档\n\n显示语言根据收件人的浏览器设置自动识别","example":"default","type":"string"}},{"name":"UnSubscribeFilterLevel","in":"formData","schema":{"description":"过滤级别。参照[退订功能生成链接和过滤机制](~~2689048~~)文档\n\ndisabled: 不过滤\n\ndefault: 采用默认策略，批量地址采用发信地址级别过滤\n\nmailfrom: 发信地址级别过滤\n\nmailfrom_domain: 发信域名级别过滤\n\nedm_id: 账号级别过滤","example":"mailfrom_domain","type":"string"}},{"name":"Headers","in":"formData","schema":{"description":"邮件头设置\n\n标准字段和非标准字段都需要符合标准中对头的语法要求，API 发信最多可通过 headers 字段传入 10 个标头，超出限制会被忽略，SMTP 没有限制。\n\n1、标准字段\n\nMessage-ID，List-Unsubscribe，List-Unsubscribe-Post\n\n标准字段会覆盖掉邮件头中原有的值。\n\n2、非标准字段\n\n不区分大小写\n\na、以 X-User- 开头（不推送到事件总线EB、消息服务MNS。仅API要求，SMTP任意自定义）\n\nb、以 X-User-Notify- 开头（推送到事件总线EB、消息服务MNS。API和SMTP都支持）\n\n\n推动到EB或MNS时，header字段下会包含这些字段","example":"{\n      \"Message-ID\": \"<d52ce63e-a0d5-4f95-b6a9-e1256a44f5fb@example.net>\",\n      \"X-User-UID1\": \"UID-1-000001\",\n      \"X-User-UID2\": \"UID-2-000001\",\n      \"X-User-Notify-UID1\": \"UID-3-000001\",\n      \"X-User-Notify-UID2\": \"UID-4-000001\"\n\t  \n}","type":"string","isFileTransferUrl":false}},{"name":"IpPoolId","in":"formData","schema":{"description":"独立IP地址池ID。购买了独立IP的用户可以通过这个参数指定本次发信出口IP。 参照[独立IP](~~2932088~~)文档。","example":"e4xxxxxe-4xx0-4xx3-8xxa-74cxxxxx1cef","type":"string"}},{"name":"Attachments","in":"formData","style":"repeatList","schema":{"description":"仅支持下载新版SDK使用，openapi和签名机制方式暂不支持。 参照[如何通过SDK方式发送带附件的邮件？](~~2937843~~)文档。","type":"array","items":{"description":"仅支持下载新版SDK使用，openapi和签名机制方式暂不支持。","type":"object","properties":{"AttachmentName":{"description":"仅支持下载新版SDK使用，openapi和签名机制方式暂不支持。","example":"test.txt","type":"string","isFileTransferUrl":false},"AttachmentUrl":{"description":"仅支持下载新版SDK使用，openapi和签名机制方式暂不支持。","example":"C:\\Users\\Downloads\\test.txt","type":"string","isFileTransferUrl":true}}},"maxItems":100}},{"name":"Template","in":"formData","style":"json","schema":{"title":"模版发送，模版信息\n","description":"模版发送，模版信息\n\n使用模板发送时，将忽略Subject、Htmlbody和TextBody传值","type":"object","properties":{"TemplateId":{"title":"模版ID\n","description":"模版ID\n","example":"123456","type":"string","required":false},"TemplateData":{"title":"模版变量与值","description":"模版变量与值","example":"{\"name\":\"Tom\",\"age\":\"22\"}","type":"object","additionalProperties":{"title":"参数变量","description":"模版变量参数与值","example":"{ \"name\": \"Tom\", \"age\": \"22\" }","type":"string"}}}}},{"name":"BccAddress","in":"formData","schema":{"title":"密送邮件地址","description":"- 指定邮件的密送收件人列表。\n- 系统会将与主邮件内容一致的副本分别发送至每个密送地址，但密送信息对所有收件人（含ToAddress、BccAddress）均不可见。\n- 为了保护密送收件人的隐私，发送给密送收件人的邮件将默认不开启任何邮件追踪功能。 这意味着，对于密送邮件，系统不会记录打开率、点击率等行为数据。但发送量的计费、和发送详情、和发送状态的统计与正常邮件一致。\n- 每次发送最多可指定2个密送收件人。\n\n注意：SingleSendMail接口暂无Cc抄送字段，如果需要请使用SMTP发信方式。","example":"1@example.com,2@example.com","type":"string"}},{"name":"DomainAuth","in":"formData","schema":{"title":"启用域级别认证","description":"启用域级别认证\n\n- true\n\n- false\n\n仅在域级别认证时使用，发信地址级别认证请忽略。\n\n1、domain-auth-created-by-system@example.com 控制台创建这个地址，@前缀保持固定不变，后缀用自己域名。\n\n2、\n\n**API场景**\n\nAccountName填该域名的自定义发信地址，收件人看到的发件人是该自定义发信地址。\n\n**SMTP场景**\n\na.通过 ModifyPWByDomain 接口设置域名密码。\n\nb.使用域名和设置的密码认证，真实发件人mailfrom传自定义的地址，如user@example.com，收件人看到的发件人是user@example.com。","example":"true","type":"boolean"}}],"responses":{"200":{"schema":{"type":"object","properties":{"EnvId":{"description":"事件ID","example":"600000xxxxxxxxxx642","type":"string"},"RequestId":{"description":"请求ID","example":"2D086F6-xxxx-xxxx-xxxx-006DED011A85","type":"string"}},"description":""}}},"errorCodes":{"400":[{"errorCode":"InvalidReceiverName.Malformed","errorMessage":"The format of the receiver name is invalid. It must contain the @ sign. The domain must only contain numbers, letters, underscores, minus signs, and periods. The account name must only contain numbers, letters, underscores, minus signs, and periods.","description":"收件人格式不正确，必须有@符号，域名组成为数字，字母，下划线，减号和点，账号组成为数字，字母，下划线，减号和点"}],"404":[{"errorCode":"InvalidMailAddress.NotFound","errorMessage":"The specified mail address is not found.","description":"发信地址未找到"}]},"responseDemo":"[{\"errorExample\":\"\",\"example\":\"{\\n  \\\"EnvId\\\": \\\"600000xxxxxxxxxx642\\\",\\n  \\\"RequestId\\\": \\\"2D086F6-xxxx-xxxx-xxxx-006DED011A85\\\"\\n}\",\"type\":\"json\"}]","gatewayOptions":{"fileTransfer":true},"title":"发送单条邮件","changeSet":[],"flowControl":{"flowControlList":[{"threshold":"500","countWindow":1,"regionId":"*","api":"SingleSendMail"}],"product":{"code":"dms","title":"数据管理"}},"ramActions":[{"operationType":"none","ramAction":{"action":"dm:SingleSendMail","authLevel":"operate","actionConditions":[],"resources":[{"validationType":"always","product":"DirectMail","resourceType":"全部资源","arn":"*"}]}}],"components":{"schemas":{}}}