How to Send Emails Using DirectMail

By Oliver Zhang, Solutions Architect — Alibaba Cloud ANZ

DirectMail is a simple and efficient service to send email notifications and batch email quickly and efficiently without the need to build your own email server. DirectMail is a key product for serving Alibaba’s own e-commerce platforms, which includes servicing Alibaba’s record-breaking Double 11 annual shopping festival.

In this article, we are going to discuss how to use Alibaba Cloud DirectMail (DM) service to send emails. It’s actually quite easy to setup the email domain and sender on the DM console, and then using telnet to test it.


  1. An Alibaba Cloud account
  2. A test domain with access to change DNS records
  3. An email inbox for testing
  4. Add your email domain into DM.
  5. a. Click on “Email Domains”

b. Click on “New Domain”

c. Type in your domain

d. Click on “Configure”

e. On the configure page, these are the records need to be added into the domain DNS.

f. Go to your domain service provider and add the records.

g. Verify the domain

h. If your DNS records were setup correctly, the domain shall pass the verification.

Setup the SMTP password for the domain

a. Go to “"

b. Choose “Products” -> “DirectMail”

c. Choose “ModifyPWByDomain”

d. Select the region you have setup domain and type in the domain name and password, then “Submit Request”

e. A return code will be displayed

Setup sender address in the DM console

a. Create Sender Address

b. Add the test email sender

Test email with telnet

a. Telnet script

  • telnet 25 HELO AUTH LOGIN <domain converted to base64 code> <domain password converted to base64 code> MAIL FROM:<> RCPT TO: <> DATA subject: test email title from: <> to: <> test email body . quit

b. Example

c. Test result


Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store