Batch Send Emails
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| dm:BatchSendMail | none | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| TemplateName | string | Yes | The name of the template that has been created and approved in advance. | test1 |
| AccountName | string | Yes | The sending address configured in the management console. | test@example.com |
| ReceiversName | string | Yes | The name of the recipient list that has been created and uploaded with recipients. Note: The recipient list should not be deleted until at least 10 minutes after the task is triggered, otherwise it may cause sending failure. | test2 |
| AddressType | integer | Yes |
| 1 |
| TagName | string | No | Email tag name. | test3 |
| ReplyAddress | string | No | Reply address | test2***@example.net |
| ReplyAddressAlias | string | No | Alias for the reply address | Lucy |
| ClickTrace | string | No |
| 0 |
| UnSubscribeLinkType | string | No | The type of generated unsubscribe link. Refer to the Unsubscribe Function Link Generation and Filtering Mechanism document.
| default |
| UnSubscribeFilterLevel | string | No | Filtering level. Refer to the Unsubscribe Function Link Generation and Filtering Mechanism document.
| mailfrom_domain |
| Headers | string | No | Currently, the standard fields that can be added to the email header are Message-ID, List-Unsubscribe, and List-Unsubscribe-Post. Standard fields will overwrite the existing values in the email header, while non-standard fields must start with X-User- and will be appended to the email header. Currently, up to 10 headers can be passed in JSON format, and both standard and non-standard fields must comply with the syntax requirements for headers. | { "Message-ID": "<msg0001@example.com>", "X-User-UID1": "UID-1-000001", "X-User-UID2": "UID-2-000001" } |
| IpPoolId | string | No | dedicated IP pool ID. Users who have purchased an dedicated IP can use this parameter to specify the outgoing IP for this send operation. | xxx |
Response parameters
Examples
Sample success responses
JSONformat
{
"EnvId": "xxx",
"RequestId": "12D086F6-8F31-4658-84C1-006DED011A85"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-01-09 | The request parameters of the API has changed | View Change Details |
| 2024-02-20 | The request parameters of the API has changed | View Change Details |
| 2022-09-06 | API Description Update. The API operation is not deprecated.. The Error code has changed | View Change Details |
