调用BatchSendMail批量发送邮件。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称  | 类型  | 是否必选  | 示例值  | 描述  | 
AccountName  | String  | 是  | test@example.com  | 管理控制台中配置的发信地址。  | 
AddressType  | Integer  | 是  | 1  | 
  | 
ReceiversName  | String  | 是  | test2  | 预先创建且上传了收件人的收件人列表名称,注意:收信人列表需要在触发任务之后至少10分钟后再删除,否则容易引起发信失败  | 
TemplateName  | String  | 是  | test1  | 预先创建且通过审核的模板名称。  | 
Action  | String  | 否  | BatchSendMail  | 系统规定参数。取值:BatchSendMail。  | 
ClickTrace  | String  | 否  | 0  | 
  | 
TagName  | String  | 否  | test3  | 邮件标签名称。  | 
ReplyAddress  | String  | 否  | test2***@example.net  | 回信地址  | 
ReplyAddressAlias  | String  | 否  | 小红  | 回信地址别称  | 
UnSubscribeLinkType  | String  | 否  | default  | 生成的退订链接类型。参照退订功能帮助说明文档 
 "google", "aol.com", "hotmail", "outlook", "ymail.com"等 
  | 
UnSubscribeFilterLevel  | String  | 否  | mailfrom_domain  | 过滤级别。参照退订功能帮助说明文档 
  | 
返回数据
名称  | 类型  | 示例值  | 描述  | 
EnvId  | String  | xxx  | 事件ID  | 
RequestId  | String  | 12D086F6-8F31-4658-84C1-006DED011A85  | 请求ID  | 
示例
请求示例
https://dm.aliyuncs.com/?Action=BatchSendMail
&AccountName=test@example.com
&AddressType=1
&ReceiversName=test2
&TemplateName=test1
&<公共请求参数>正常返回示例
XML 格式
 
<BatchSendMailResponse>
      <RequestId>12D086F6-8F31-4658-84C1-006DED011A85</RequestId>
      <EnvId>xxx</EnvId>
</BatchSendMailResponse>JSON 格式
 
{
        "EnvId":"xxx",
        "RequestId":"12D086F6-8F31-4658-84C1-006DED011A85"
}错误码
HttpCode  | 错误码  | 错误信息  | 描述  | 
400  | InvalidMailAddressName.Malformed  | The specified MailAddress name is wrongly formed.  | 发信地址格式不正确,必须有@符号,域名组成为数字,字母,下划线,减号和点,账号组成为数字,字母,下划线,减号和点  | 
400  | InvalidReceiverName.Malformed  | The specified receiver name is wrongly formed.  | 收件人格式不正确,必须有@符号,域名组成为数字,字母,下划线,减号和点,账号组成为数字,字母,下划线,减号和点  | 
400  | InvalidTemplateName.Malformed  | The specified template name is wrongly formed.  | 模板名格式不正确,模板名不能大于30个字符  | 
404  | InvalidMailAddress.NotFound  | The specified mailAddress does not exist.  | 不存在,请检查批定的发信地址。  | 
404  | InvalidTemplate.NotFound  | The specified template does not exist.  | 指定的模板不存在。  | 
404  | InvalidReceiver.NotFound  | The specified receiver does not exist.  | 收件人不存在,请检查收件人是否存在  | 
400  | InvalidSendMail.Spam  | Sendmail rejected by spam filter.  | 发信被拒绝,请检查用户状态,是否是频率超限,额度等问题  | 
400  | InvalidMailAddressSendType.Malformed  | The specified mailAddress sendType is wrongly formed.  | 发送类型不正确,请去控制台检查类型,设置相应的值  | 
400  | InvalidMailAddressStatus.Malformed  | The specified mailAddress status is wrongly formed.  | 发信地址状态不对,请检查是否可用,是否是被冻结状态  | 
400  | InvalidMailAddressDomain.Malformed  | The specified mailAddress domain does not exist.  | 域名格式不正确,请使用数字,字母,下划线,减号和点  | 
400  | InvalidTemplateStatus.Malformed  | The specified template status is wrongly formed.  | 模板状态不正确,请检查模板是否已通过审核  | 
400  | InvalidReceiverStatus.Malformed  | The specified receivers status is wrongly formed.  | 收件人状态不正确,请去控制台检查是否已上传收件人  | 
400  | InvalidReplyAddressAlias.Malformed  | The specified replyAddressAlias is wrongly formed.  | 回信地址别名格式不正确,长度不超过15个符  | 
400  | InvalidReplyAddress.Malformed  | The specified replyAddress is wrongly formed.  | 回信地址格式不正确,必须有@符号,域名组成为数字,字母,下划线,减号和点,账号组成为数字,字母,下划线,减号和点  | 
访问错误中心查看更多错误码。