WordPress with LEMP on Alibaba Cloud – Part 5 Using DirectMail for WordPress Transactional Email

简介: In the previous tutorials we successfully installed WordPress on a highly performant lamp stack using an Alibaba ECS Cloud Instance.

Application_of_ELK_Uniform_Log_System

By Jeff Cleverley, Alibaba Cloud Tech Share Author

In the previous tutorials we successfully installed WordPress on a highly performant lamp stack using an Alibaba ECS Cloud Instance. The only problem was that our WordPress application had no email functionality, we couldn't subscribe new users, send email notifications, nor change passwords by email.

In today's tutorial, we are going to use the Alibaba Cloud DirectMail service as the SMTP provider for our WordPress application's transactional emails.

Step 1. Enable DirectMail

Go to your Alibaba Cloud Console, and find DirectMail from the Products and Services panel:

2

<DirectMail in the ECS Console Products & Services panel>

If you haven't already activated the DirectMail service, you will be greeted with an 'Activate Now' button:

3

<Activate DirectMail>

Click the activate button, and you will have to confirm your order before you are taken to the DirectMail overview panel:

4

<DirectMail overview panel>

Step 2. Add an Email Domain

The DirectMail overview panel shows you information about your user status, credit level, sending quotas and other useful information.

In the horizontal menu to the left of the overview panel you will see 'Email Domains', click that menu option to be taken to the following panel:

5

<Add a new domain on the Email Domains page>

Click the blue button in the top right to add a 'New Domain':

6

<Create New Email Domain>

A pop up window will open for you to enter your email-sending domain. Since this will be a domain for DirectMail to use, it is advised to use a subdomain of your WordPress applications main domain.

In the example, my domain is an-example-domain.com so the subdomain I chose was:

dm.an-example-domain.com

You can choose any subdomain that you wish.

Once the new domain has been created you will need to configure it before you can verify it:

7

<New email domains need to be configured>

First, click the link to configure your domain

8

<Email domain DNS configurations>

You will be taken to a screen that will display the different DNS setting you need to configure for your email domain. Take a note of these settings.

Open a new tab in your browser and go to the Alibaba Cloud DNS settings that you previously configured for your WordPress application domain:

9

<Alibaba Cloud DNS Settings>

Find the primary domain you are using, and click the configure link.

You will now need to enter the new DNS settings provided for you by the DirectMail Email Domain configuration window. There should be two TXT settings, an MX setting, and a CNAME setting:

10

<DNS configured for with additional DirectMail settings>

Once these settings have been entered correctly, you can return to the DirectMail Email Domain panel.

11

<DirectMail Email Domains - Verify your domain>

At the right of the row containing your Email Domain, you will see a link to verify your domain. Now that your DNS has been configured, you can go ahead and complete the verification:

12

<Verified Email Domain>

Assuming everything has been configured correctly, your email domain should now be verified. If there was a problem, go back and check all your settings again and correct any mistakes.

Step 3. Add a Sender Address

Before you can use DirectMail you need to add a sender address:

13

<Create a new sender address>

Choose 'Sender Addresses' from the horizontal DirectMail menu, and you will be taken to an empty list screen.

Click the blue button in the top right of the screen to 'Create Sender Address' and a Pop up window will appear.

You will need to select the Email Domain, create an Account, add a Reply-To address, and select the Mail Type for this Sender Address.

The Account name you create can't be changed later, and it will also be used in the from email address in the WordPress SMTP plugin later, and as your login name for the SMTP API, so select an appropriate name.

The Reply-To address will only be used for notifications from DirectMail and the Console, but it will need to be verified before you can progress, so use a working email.

In Mail Type, there are two options, triggered emails and bulk emails. In today's tutorial, we are only interested in transactional emails, so select 'Triggered Emails.'

Once you have completed these settings click OK, and find the 'verify the Reply-To' link for the Sender Address:

14

<Verify your new sender address>

Alibaba Cloud will send an email to the address you used for verification. Go to your inbox and find the email, click the link contained, and the address will be verified:

15

<Sender address verified>

Now that your sender address has been verified you will be able to set your SMTP password:

16

<Set SMTP password>

Follow the instructions to set an appropriate password and keep note of it.

Step 4. Configure WordPress to use DirectMail SMTP

The WordPress plugin repository features several plugins to configure your WordPress application to use a third party SMTP service for its transactional emails.

My recommended plugin is Easy WP SMTP.

Login in to your WordPress installation, and search for Easy WP SMTP from the Plugins settings page:

17

<Easy WP SMTP Plugin>

Install the plugin and activate it, then head to the Easy WP SMTP settings page:

18

<Easy WP SMTP settings page>

In the settings page you need to complete some fields.

The 'From Email Address' and the 'SMTP Username' will be the same as your DirectMail Sender Address.

Your 'SMTP password' will be the password you noted earlier.

You can choose any name for the 'From Name' field.

The 'SMTP Host', 'Encryption Type' and 'Port' can be found here. They are currently:

SMTP Host: smtpdm-ap-southeast-1.aliyun.com
SMTP Port: 465
Encryption Type: SSL

Once you have configured these settings, click save. You can now test your set up. Scroll to the bottom of the page and you will find a 'Test Email' panel:

19

<Easy WP SMTP Test Email>

Fill in the necessary email details and click 'Send Test Email'

A process log window will open at the top of the page:

20

<Easy WP SMTP Test Email has been sent>

You will see something similar to above if everything is working correctly. If you have any problems, take note of the error code. You can check any error codes here to troubleshoot any potential problems.

To verify that your test email has been sent, you can go to the DirectMail Delivery Log panel in the Cloud Console:

21

<DirectMail Delivery Log>

Alternatively, you can just visit your inbox and check to make sure you received the email.

Everything is done. We now have WordPress up and running and fully functional on an Alibaba stack.

目录
相关文章
|
网络协议 安全 应用服务中间件
WordPress with LEMP on Alibaba Cloud – Part 3 Configuring a Domain and Let's Encrypt SSL
Welcome to the third tutorial in this series about installing WordPress upon a highly performant server stack on an Alibaba ECS Cloud Instance.
2532 0
|
弹性计算 Shell 网络安全
Advanced WordPress Management Using WP-CLI on Alibaba Cloud ECS – Part 3
This three-part tutorial walks you through setting up WordPress advanced management with WP-CLI. Part 3 focuses on managing multiple WordPress sites with WP-CLI on Alibaba Cloud ECS.
1279 0
Advanced WordPress Management Using WP-CLI on Alibaba Cloud ECS – Part 3
|
关系型数据库 MySQL 应用服务中间件
WordPress with LEMP on Alibaba Cloud – Part 4 Installing WordPress on Your Alibaba Cloud ECS Instance
In the previous tutorials we secured an Alibaba Ubuntu 16.04 ECS instance, then installed NGINX, MariaDB, and PHP7 to complete our LEMP stack.
2993 0
|
关系型数据库 MySQL 应用服务中间件
WordPress with LEMP on Alibaba Cloud – Part 2 Completing the LEMP Stack
This tutorial is the second in a series about configuring a server to run a WordPress web application on an Alibaba Cloud Instance.
4110 0
|
Ubuntu 应用服务中间件 Shell
WordPress with LEMP on Alibaba Cloud – Part 1 Provision and Secure an Ubuntu 16.04 Server
This is the first tutorial of a series that will culminate with a fresh WordPress site running on an Alibaba Cloud ECS Instance running a highly performant LEMP Stack.
2170 0
|
5月前
|
安全
SiteGround如何设置WordPress网站自动更新
iteGround Autoupdate功能会自动帮我们更新在他们这里托管的所有WordPress网站,这样做是为了保证网站安全,并且让它们一直保持最新状态。他们会根据我们选择的设置自动更新不同版本的WordPress,包括主要版本和次要版本。在每次自动更新之前,他们都会为我们的网站做一个完整的备份,这样如果有什么问题,我们可以轻松地恢复到之前的状态。在本文中,我们将介绍如何在SiteGround中设置WordPress网站自动更新。
534 0
SiteGround如何设置WordPress网站自动更新
|
5月前
WordPress网站更换域名后如何重新激活elementor
本文讲解WordPress网站更换域名后如何重新激活elementor。首先你需要在WordPress后台elementor下点击Disconnect断开原elementor连接,然后登录elementor官网,在后台解除原网站授权;接着在WordPress后台重新连接并激活elementor。
584 2
WordPress网站更换域名后如何重新激活elementor
|
5月前
|
关系型数据库 MySQL Apache
怎么在树莓派上搭建WordPress博客网站,并发布到外网可访问?
怎么在树莓派上搭建WordPress博客网站,并发布到外网可访问?
582 1
|
3月前
【wordpress教程】wordpress博客网站添加非法关键词拦截
有的网站经常被恶意搜索,站长们不胜其烦。那我们如何屏蔽恶意搜索关键词呢?下面就随小编一起来解决这个问题吧。
60 1
|
5月前
|
域名解析 弹性计算 数据安全/隐私保护
阿里云ECS免费搭建WordPress个人博客网站
阿里云ECS免费搭建WordPress个人博客网站
680 2
阿里云ECS免费搭建WordPress个人博客网站
下一篇
无影云桌面