Community Blog How to Send Emails Using DirectMail

How to Send Emails Using DirectMail

In this tutorial, we will show you how to send emails easily with Alibaba Cloud DirectMail (DM) service.

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

  1. Add your email domain into DM.

    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.


  2. Setup the SMTP password for the domain

    a.  Go to "https://api.aliyun.com/?#/"


    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


  3. Setup sender address in the DM console

    a.  Create Sender Address


    b.  Add the test email sender



  4. Test email with telnet

    a.  Telnet script

    telnet smtpdm-ap-southeast-2.aliyun.com 25
    HELO alibabacloudanz.com
    <domain alibabacloudanz.com converted to base64 code>
    <domain password converted to base64 code>
    MAIL FROM:<bobthebuilder@alibabacloudanz.com>
    RCPT TO: <oliver.zhang@alibaba-inc.com>
    subject: test email title
    from: <bobthebulder@alibabacloudanz.com>
    to: <oliver.zhang@alibaba-inc.com>
    test email body

    b.  Example


    c.  Test result


3 2 1
Share on

Alibaba Clouder

2,624 posts | 720 followers

You may also like


Raja_KT March 10, 2019 at 12:48 pm

Well-articulated with screenshots. The API calls show that we have to learn a lot.

5782493885140140 March 26, 2021 at 7:23 pm

Can this be done on video for better understanding, I searched on youtube, no single video about this, unlike every other mailing service

5473555080475867 June 13, 2022 at 1:58 am

  1. Select the region you have setup domain and type in the domain name and password, then "Submit Request"I am stuck on this point which password do I need in the password filed after region and domain select please reply to anyone. thank you miansaqlain237@gmail.com

Alibaba Clouder

2,624 posts | 720 followers

Related Products

  • DirectMail

    A simple and efficient email service to help you send transactional notifications and batch email

    Learn More
  • DNS

    Alibaba Cloud DNS is an authoritative high-availability and secure domain name resolution and management service.

    Learn More
  • Short Message Service

    A messaging service that covers the globe, Alibaba SMS provides convenient, efficient, and intelligent communication capabilities that help businesses quickly contact their customers.

    Learn More