All Products
Search
Document Center

Direct Mail:Email sending FAQ

Last Updated:May 27, 2026

Answers to common questions about Direct Mail sending methods, email types, spam handling, and troubleshooting.

What sending methods does Direct Mail support?

Direct Mail supports three sending methods:

What types of emails can I send with Direct Mail?

Direct Mail supports two email types:

  • Transactional emails: Event-triggered messages such as registration notifications, transaction alerts, and password reset confirmations.

  • Batch emails: Promotional or newsletter messages sent to subscribers. Recipients must have actively opted in — their addresses must come from member registrations. Sending unsolicited spam is not allowed.

Can I add attachments to emails?

Attachments are not supported when sending from the console or using the API.

Attachments are supported when sending over SMTP. For details, see How do I send an email with an attachment using SMTP?

Why is port 25 unavailable for SMTP?

Port 25 is disabled on Elastic Compute Service (ECS) instances for security reasons.

If your sending program runs on an Alibaba Cloud ECS instance, use port 80 (without SSL) or port 465 (with SSL).

Why are my emails going to spam?

Whether an email lands in the spam folder is determined by the recipient's anti-spam policy. The sender cannot see the specific reasons.

If your logs show an email as delivered but the recipient cannot find it, the message was accepted by the recipient's mail server (with a 250 OK response) but may have been routed to spam, queued, or silently discarded after that point. Inbox providers do not share what happens to a message after accepting it.

How to reduce spam classification

  • Optimize your content:

  1. Avoid words commonly found in spam — ALL CAPS, excessive exclamation marks, and phrases like "Buy now!" or "Free!" are strong spam signals.

  2. Avoid URL shorteners in your email body. Shortened links are frequently flagged as spam.

  3. Include a working unsubscribe link, a brief introduction to your company and product, and a prominent request for recipients to add your sender address to their whitelist or contact list.

  • Warm up your sender address:

  1. Start with a low sending volume and increase it gradually based on delivery errors and open rates. Each receiving mail system applies its own throttling mechanisms, and a sudden spike in volume is a common spam trigger.

  • Other suggestions:

  1. For internal company recipients, contact the recipient's email administrator to add your sender address to the whitelist.

  2. Sending the same subject line to many recipients at once is a spam signal. Vary subject lines or contact the recipient's mail service provider if your business requires bulk sends with identical subjects.

  • Test your content before sending:

  1. Use mail-tester.com to check your email against common spam filters before sending. Send your content to the test mailbox and review the score and feedback.

Note: mail-tester.com uses its own scoring system, which differs from each email provider's anti-spam rules. Use the results as a guide to improve content quality, not as a guarantee of inbox delivery.

How to handle invalid addresses

The console identifies invalid addresses to help you keep recipient lists clean and reduce your invalid address rate.

To view and export invalid addresses, go to Data Statistics > Invalid Addresses in the Direct Mail console.

The system automatically adds an address to the invalid address database after multiple failed delivery attempts. Emails to addresses in this database are rejected. If you are sure an address is valid, contact us to remove it.

  • If you use a recipient list in the console, remove the invalid addresses from the list and re-upload or edit it.

  • If the addresses come from registered members, purge the invalid addresses and add an email validation step to your registration flow. For example, query the DNS server for an MX record when a user registers. If no MX record exists, treat the address as invalid (assuming normal network connectivity).

  • If your invalid address rate is too high, purge invalid addresses before requesting a quota increase or having a block lifted.

How to choose a sending region

  1. The region you choose determines where your data is stored. If you have international customers, consult your legal department to confirm which region meets data residency requirements.

  2. If your sending program is deployed in the Chinese mainland, select the China (Hangzhou) region.

  3. If your sending program is deployed outside the Chinese mainland and most recipients are also outside the Chinese mainland, use a region such as Singapore or a US region.

  4. If your sending program is deployed outside the Chinese mainland but most recipients are in the Chinese mainland:

a) If your program sends over SMTP and is deployed in the US or Singapore, select the China (Hangzhou) region. Traffic is automatically routed to the China (Hangzhou) node through an accelerated node in the US or Singapore.

b) In other cases, use the Singapore region.

How to troubleshoot sending issues

First, identify which sending method you are using and check for any error messages or exceptions.

API

  • If there is an error message or exception

  1. Check the error code in the API reference.

    • If there is no error message or exception

  2. Confirm you are using the correct Direct Mail region. Check that the region parameter matches your Direct Mail region and that your AccessKey pair is correct.

  3. Verify that parameters are configured as described in the documentation. Check that parameter values match the settings in the console and that the server time zone meets the documentation requirements.

  4. Verify the request signature, paying close attention to special character encoding.

    • If the issue persists, refer to the request example. For more information, see Request example (Java).

    • If the issue persists, provide the API name, parameters used in the call, the error message or exception, and your sanitized code.

SDK

  • If there is an error message or exception

  1. Check the error code in the API reference.

    • If there is no error message or exception

  2. Confirm you are using the correct Direct Mail region. Check that the region parameter matches your Direct Mail region and that your AccessKey pair is correct.

  3. Verify that parameters are configured as described in the documentation. Check that parameter values match the settings in the console and that the server time zone meets the documentation requirements.

    • If the issue persists, refer to the SDK examples. For more information, see SDK Reference.

    • If the issue persists, provide the request class name, parameters used, the error message or exception, and your sanitized code.

SMTP

  • If there is an error message or exception

  1. Check the corresponding error code.

    • If there is no error message or exception

  2. Confirm you are using the correct Direct Mail region. Check that the host matches your Direct Mail region's host, that the server is an Alibaba Cloud ECS instance, and that you are using one of the allowed ports.

  3. Verify that parameters are configured as described in the documentation and that parameter values match the settings in the console.

    • If the issue persists, refer to the SMTP code example. For more information, see Java example for SMTP.

    • If the issue persists, provide the parameters used in the call, the error message or exception, and your sanitized code.

Other methods

  • Technical support is not available for sending methods that are not described in the official documentation. Resolve such issues independently.

How to troubleshoot email content issues

Identify which sending method you are using, then follow the corresponding guidance.

API

For more information, see API overview.

  • For single sends, customize parameters and the email body, and replace all parameters before calling the API. For more information, see SingleSendMail.

  • For batch sends, use a template and a recipient list. Only the parameters documented in the API are supported — custom parameters are not allowed. For more information, see BatchSendMail.

SDK

For more information, see SDK Reference.

  • For single sends, customize parameters and the email body, and replace all parameters before calling the API. For parameter descriptions, see the corresponding API documentation.

  • For batch sends, use a template and a recipient list. Only the parameters documented in the API are supported — custom parameters are not allowed. For parameter descriptions, see the corresponding API documentation.

SMTP

For more information, see SMTP endpoints.

  • Customize parameters and the email body, and replace all parameters before making the request.

Console

  • The console supports batch emails only — transactional emails and attachments are not supported. Select an uploaded recipient list, an approved template, a sender address, and an address type. Only the parameters documented in the template content are supported — custom parameters are not allowed. For more information, see Send emails from the console.

Other methods

  • Technical support is not available for sending methods that are not described in the official documentation. Resolve such issues independently.