×
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.

Prerequisites

  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"

    1

    b.  Click on "New Domain"

    2

    c.  Type in your domain

    3

    d.  Click on "Configure"

    4

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

    5

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

    6

    g.  Verify the domain

    7

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

    8

  2. Setup the SMTP password for the domain

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

    9

    b.  Choose "Products" -> "DirectMail"

    10

    c.  Choose "ModifyPWByDomain"

    11

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

    12

    e.  A return code will be displayed

    13

  3. Setup sender address in the DM console

    a.  Create Sender Address

    14

    b.  Add the test email sender

    15

    16

  4. Test email with telnet

    a.  Telnet script

    telnet smtpdm-ap-southeast-2.aliyun.com 25
    HELO alibabacloudanz.com
    AUTH LOGIN
    <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>
    DATA
    subject: test email title
    from: <bobthebulder@alibabacloudanz.com>
    to: <oliver.zhang@alibaba-inc.com>
    
    test email body
    .
    quit 

    b.  Example

    17

    c.  Test result

    18

1 1 1
Share on

Alibaba Clouder

1,439 posts | 228 followers

You may also like

Comments

Raja_KT March 10, 2019 at 12:48 pm

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