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.
- An Alibaba Cloud account
- A test domain with access to change DNS records
- An email inbox for testing
- 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.
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
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 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:<firstname.lastname@example.org> RCPT TO: <email@example.com> DATA subject: test email title from: <firstname.lastname@example.org> to: <email@example.com> test email body . quit
c. Test result