Sends emails in batch.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dm:BatchSendMail |
none |
*全部资源
|
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
Note Note
The number of recipients in the list must not exceed the remaining daily quota. Otherwise, the email sending fails. Note
Wait at least 10 minutes after triggering the task before deleting the recipient list. Otherwise, the email sending may fail. |
test2 |
| AddressType |
integer |
Yes |
Valid values:
|
1 |
| TagName |
string |
No |
The name of the email tag. |
test3 |
| ReplyAddress |
string |
No |
The reply-to address. |
test2***@example.net |
| ReplyAddressAlias |
string |
No |
The alias of the reply-to address. |
Jane |
| 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.
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.
|
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 exceeding 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 to API only. 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. |
e4xxxxxe-4xx0-4xx3-8xxa-74cxxxxx1cef |
| DomainAuth |
boolean |
No |
Specifies whether to enable domain-level authentication.
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. Set the actual sender (mailfrom) to a custom address such as user@example.com. The recipient sees user@example.com as the sender. |
true |
| TemplateContent |
object |
No |
The custom email content. Directly specify the content without creating a template in advance. Use this parameter or TemplateName. If both TemplateContent and TemplateName are specified, TemplateName takes precedence. |
|
| Subject |
string |
No |
The email subject. |
黑色星期五,专属折扣来袭 |
| HtmlBody |
string |
No |
The HTML body of the email. Note
Note: HtmlBody and TextBody are for different types of email content. You must specify at least one of them. The new SDK uses Body for parameter passing with a 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
Note: HtmlBody and TextBody are for different types of email content. You must specify at least one of them. The new SDK uses Body for parameter passing with a 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 must not exceed 100. Use 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 is an array type. |
|
|
string |
No |
The email address. |
Jackie@example.com |
|
| TemplateData |
object |
No |
The email template parameters. This is a JSON map data 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.