Direct Mail provides a one-click unsubscribe feature that collects unsubscribe addresses in a recipient-friendly way. When you send emails, Direct Mail filters out these addresses based on specific rules to help reduce email complaints, improve the reputation of your sender address, and increase your inbox placement rate.
The one-click unsubscribe feature complies with the RFC 2369 and RFC 8058 protocols. Major email service providers, such as Google, Microsoft, and Yahoo, widely support this feature.
Whether the unsubscribe button is displayed depends on the recipient's email provider policy. For example, Gmail does not immediately display the unsubscribe button if the domain name reputation is not high enough.
This document describes how the one-click unsubscribe feature works and how to use it.
1. Unsubscribe link mechanism
The unsubscribe link is added to the List-Unsubscribe message header and does not affect your email body. By default, an unsubscribe link is generated when you send emails to Google, ProtonMail for Business, and specific domains. These domains include those with keywords such as "gmail", "yahoo",
An unsubscribe link is generated for emails sent to mailboxes from providers such as Gmail, AOL, Hotmail, Outlook, and Yahoo Mail, but not for emails sent to Microsoft 365 enterprise mailboxes.
Example with Gmail
Relevant message headers


Page display
Method 1: One-click unsubscribe
The message header must contain List-Unsubscribe-Post: List-Unsubscribe=One-Click.
Two implementation methods:
Use the configuration provided by Direct Mail: Set the `X-AliDM-Settings` header. Direct Mail automatically configures
List-Unsubscribe-PostandList-Unsubscribe.
For more information about how to set X-AliDM-Settings, see Control features using configuration item headers over SMTP.
Use a custom unsubscribe URL: When sending emails over SMTP, include
List-Unsubscribe-Post: List-Unsubscribe=One-Clickin the message header. You must also include your custom unsubscribe link in theList-Unsubscribeheader. The unsubscribe link must support one-click unsubscribe.

Method 2: Unsubscribe by redirecting to a website
The message header must not contain List-Unsubscribe-Post: List-Unsubscribe=One-Click.
Use a custom unsubscribe URL: Do not set
X-AliDM-Settings. When sending emails over SMTP, include your custom unsubscribe link in theList-Unsubscribemessage header.


2. Unsubscribe list filtering mechanism
Unsubscribed addresses are added to your dedicated unsubscribe list. This action takes effect within one hour. When you send an email, Direct Mail filters recipients based on the filtering level. If a recipient is on the unsubscribe list, the delivery fails. There are three filtering levels:
Sender address level: Direct Mail checks if the recipient has unsubscribed from this specific sender address. If so, the delivery fails.
Email domain level: Direct Mail checks if the recipient has unsubscribed from any sender address under this email domain. If so, the delivery fails. We recommend that you use different domains for batch emails and triggered emails. This level is suitable for scenarios where you send batch emails from a specific domain.
Account level: Direct Mail checks if the recipient has unsubscribed from all sender addresses under your Alibaba Cloud account. If so, the delivery fails. This level is suitable if you use all your sender addresses for promotions and marketing.
The link generation and filtering mechanisms for the unsubscribe feature are as follows:
Scenario | Do you want to generate a link? | Filtering mechanism |
Batch email (default "LinkType": "default" "FilterLevel": "default") | Yes | Sender address level |
Trigger address (default) "LinkType": "default" "FilterLevel": "default") | No | No filtering |
User implements one-click unsubscribe | Maintains the user's link | No filtering |
User-defined | User-defined | User-defined |
To define these settings yourself:
When sending emails over the SMTP protocol, configure the unsubscribe link and filtering level. For more information, see Control features using configuration item headers over SMTP.
When sending emails using an API, see the documentation for the SingleSendMail or BatchSendMail API operations.
3. Manage and query the unsubscribe list
Unsubscribe
Recipients who no longer want to receive your emails can click the unsubscribe button in their mailbox.
If the recipient's email provider does not display an unsubscribe button, they can find an unsubscribe link in the email body.

Unsubscribe management
If a recipient unsubscribes by mistake, you can remove their address from the unsubscribe list. In the Direct Mail console, go to Reporting > Unsubscribe to manage the records.

Recipients can also click the unsubscribe link again to resubscribe. The unsubscribe record is then automatically deleted.

If the recipient did not unsubscribe by mistake, do not remove them from the list. Removing them may cause a high complaint rate for your sender address or email domain. This can lead to blacklisting by email providers and negatively affect the delivery success rate for other recipients.
Do not send marketing, subscription, or other similar types of emails to an unsubscribed recipient. To send triggered emails, such as those containing verification codes, use a sender address that is designated for triggered emails.
Related API operation: UnblockSending - Remove sending restrictions