Configuring Microsoft Dynamics AX 2012 Alerts and Email Notifications
Using an SMTP Email Relay Server with Office 365
Song Nghia - Technical Consultant
With more AX Server machines being run in the cloud on Microsoft Azure we need a simple way to
connect Dynamics AX 2012 to cloud hosted mail servers without the need to run Exchange server in
the same Azure virtual network (vnet) as our Dynamics AX servers. Currently the demo images that
Microsoft provides for download all rely on a dedicated VM (AX2012R2B) running Exchange Server to send email alerts and workflow messages. This is not a practical or a realistic current scenario with
Dynamics AX servers running on Microsoft Azure. The Life Cycle Services demo image that gets
generated does not even include a mail server image to distribute notification emails. Today with
more clients running with Office 365 we need a way to connect our hosted AX servers to a cloud
hosted email service.
The challenge is that most cloud based email services running today require SSL or TLS secure
encryption for authentication and unfortunately Dynamics AX 2012 does not support this additional
authentication natively. There are a number of ways to customize Dynamics AX to support this
additional secure authentication but it is much easier to use a Windows Server Simple Mail Transfer
Protocol (SMTP) server as a relay. There are no additional costs to run an SMTP server as this is a
feature included in Windows Server. This article will walk through the steps to configure the
Windows Server 2012 R2 SMTP Feature to act as a relay to Office 365 as well as how to configure
Dynamics AX mail settings to support this scenario.
First consider where to install the SMTP service in your production environment. If you are using
Workflow extensively you will have at least one dedicated workflow batch server. Depending on the
volume of messages consider placing the SMTP service on this dedicated workflow batch server.
Avoid installing the SMTP service on the production database server as a best practice. However for
demo systems it works fine to include the SMTP service on the all in one server machine. For this
article we will configure the SMTP service on a Dynamics AX2012 R3-CU8 demo image generated
from Life Cycle Services.
This article only covers email alert and workflow messages. Microsoft also now has integration with
Exchange Server either on premise or on Office 365 for the Sales and Marketing module for
Account/Contacts, tasks and calendar. This integration is available but not in the scope of this article.
One more note about flooding SMTP messages from your server to the mail provider. You want to
avoid any extremely large volumes of relay messages so you don’t get blacklisted. Just keep this in
mind to avoid this situation.
We will cover the following topics throughout this article:
Installing the SMTP Server
Configuring the SMTP Server
o Testing SMTP Relay Messages
o Troubleshooting SMTP eMail Sending
Configuring Dynamics AX to use Windows SMTP Server
Configuring Alert eMail Messages
Testing Alert eMail Messages
Using Gmail as an SMTP Mail Server