Sends emails in batches.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dm:BatchSendMail |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateName |
string |
No |
The name of a pre-created and approved template. |
test1 |
| AccountName |
string |
Yes |
The sender address configured in the management console. |
test@example.com |
| ReceiversName |
string |
No |
The name of a pre-created recipient list that has recipients uploaded. Note: The number of recipients in the list must not exceed the remaining daily quota. Otherwise, the email sending fails. Do not delete the recipient list until at least 10 minutes after the task is triggered. Otherwise, the email sending may fail. |
test2 |
| AddressType |
integer |
Yes |
Valid values:
|
1 |
| TagName |
string |
No |
The tag name of the email. |
test3 |
| ReplyAddress |
string |
No |
The reply-to address. |
test2***@example.net |
| ReplyAddressAlias |
string |
No |
The alias of the reply-to address. |
小红 |
| ClickTrace |
string |
No |
Valid values:
|
0 |
| UnSubscribeLinkType |
string |
No |
The type of the generated unsubscribe link. For more information, see Unsubscribe link generation and filtering mechanism. Valid values:
The display language is automatically determined based on the recipient's browser settings. |
default |
| UnSubscribeFilterLevel |
string |
No |
The filtering level. For more information, see Unsubscribe link generation and filtering mechanism. Valid values:
|
mailfrom_domain |
| Headers |
string |
No |
The email header settings. Both standard and non-standard fields must comply with the syntax requirements for headers defined in the standard. A maximum of 10 headers can be passed through the headers field when sending emails via API. Headers that exceed this limit are ignored. SMTP has no such limit.
Message-ID, List-Unsubscribe, List-Unsubscribe-Post Standard fields overwrite the original values in the email header.
Case-insensitive. a. Fields prefixed with X-User- (not pushed to EventBridge or Message Service (MNS). This restriction applies only to API. SMTP allows any custom fields.) b. Fields prefixed with X-User-Notify- (pushed to EventBridge and Message Service (MNS). Both API and SMTP are supported.) When pushed to EventBridge or MNS, these fields are included under the header field. |
{
"Message-ID": " |
| IpPoolId |
string |
No |
The ID of the dedicated IP address pool. Users who have purchased dedicated IP addresses can use this parameter to specify the outbound IP address for this email sending task. |
e4xxxxxe-4xx0-4xx3-8xxa-74cxxxxx1cef |
| DomainAuth |
boolean |
No |
Specifies whether to enable domain-level authentication. Valid values:
Use this parameter only for domain-level authentication. Ignore it for sender address-level authentication.
API scenario Set AccountName to the domain name. The recipient sees domain-auth-created-by-system@example.com as the sender. SMTP scenario a. Call the ModifyPWByDomain operation to set the domain password. b. Authenticate with the domain name and the configured password. Pass a custom address such as user@example.com as the actual sender (mailfrom). The recipient sees user@example.com as the sender. |
true |
| TemplateContent |
object |
No |
The custom email content. You can directly specify the content without creating a template in advance. Specify this parameter or TemplateName. If both TemplateContent and TemplateName are specified, TemplateName takes precedence. |
|
| Subject |
string |
No |
The subject of the email. |
黑色星期五,专属折扣来袭 |
| HtmlBody |
string |
No |
The HTML body of the email. Note: HtmlBody and TextBody are used for different types of email content. You must specify one of them. The new SDK uses Body for parameter passing with a size limit of approximately 8 MB (Java 1.4.0 and later, Python3 1.4.0 and later, PHP 1.4.0 and later). |
全场九折,仅限今日 |
| TextBody |
string |
No |
The plain text body of the email. Note: HtmlBody and TextBody are used for different types of email content. You must specify one of them. The new SDK uses Body for parameter passing with a size limit of approximately 8 MB (Java 1.4.0 and later, Python3 1.4.0 and later, PHP 1.4.0 and later). |
全场九折,仅限今日 |
| Alias |
string |
No |
The display name of the sender. |
Jackie |
| Receivers |
array<object> |
No |
The recipient list. The number of recipients cannot exceed 100. Specify this parameter or ReceiversName. If both Receivers and ReceiversName are specified, ReceiversName takes precedence. Example: [{"To":["Jackie@example.com"],"TemplateData":{"UserName":"Jackie"}},{"To":["Tom@example.com"],"TemplateData":{"UserName":"Tom"}}]. |
|
|
array<object> |
No |
The details of a custom recipient. |
||
| To |
array |
No |
The recipient list. This parameter is of the array type. |
|
|
string |
No |
The email address. |
Jackie@example.com |
|
| TemplateData |
object |
No |
The email template parameters. This parameter is of the JSON map type. |
|
|
string |
No |
key-value 字符串 |
{"UserName": "Jackie"} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| EnvId |
string |
The event ID. |
xxx |
| RequestId |
string |
The request ID. |
12D086F6-8F31-4658-84C1-006DED011A85 |
Examples
Success response
JSON format
{
"EnvId": "xxx",
"RequestId": "12D086F6-8F31-4658-84C1-006DED011A85"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.