Professional Documents
Culture Documents
1
Conclusion
Dynamics AX servers running in the cloud on Azure can be easily configured to send mail notifications
relaying from cloud hosted mail servers such as Office 365 and Gmail without the need to have a
dedicated exchange server also running in the cloud. Using this simple configuration you can
leverage cloud mail systems reducing the licensing and system machine costs required to run
dedicated Exchange Servers in the same virtual location as Dynamics AX.
Outlook
Alert/Workflow Messages
Dynamics AX Server
2
Installing the SMTP Server
The first step is to add the SMTP feature to windows server from the server manager, Manage, Add
Roles and Features. Then step through the wizard screens below to complete the installation process.
This next process is driven from the following Microsoft technical article but shows step by step
visuals of how this is done.
https://technet.microsoft.com/en-us/library/dn592151.aspx
3
Make sure IIS basic authentication is installed. It will most likely already be there especially on an AX
demo image.
4
5
6
7
Configuring the SMTP Server
Once the installation wizard completes make sure the SMTP Service is started on the server before
you being the next step. The easiest way to manage the SMTP Server is from the Server Manager
Tools menu. Select Internet Information Server (IIS) 6.0 Manager.
8
9
10
11
Once all of these settings are completed re-start the SMTP Service.
12
Testing SMTP Relay Messages
You should always test the sending of SMTP messages through the relay before configuring Dynamics
AX. This can help avoid confusion and difficulty in troubleshooting later on in the process. In order to
test the sending of SMTP message first create a txt file in Notepad with the following information
(using your own email addresses of course:
FROM: icole@uxce.onmicrosoft.com
TO: icole@uxceclipse.com
SUBJECT: Test email
This is a test email sent from my SMTP server
Make sure that the FROM: address is the user that can authenticate on the remote mail server.
1) Drop the text file in the folder C:\inetpub\mailroot\Pickup
You will notice that the file almost immediately disappears since the SMTP service is monitoring this
folder for entries. If all is working correctly you will receive a test message from your server sent via
the SMTP relay.
13
Troubleshooting SMTP eMail Sending
Note the folders in the C:\inetpub\mailroot\ folder. You will use these to troubleshoot the service
operation.
If you don’t get the message then check if there are any files in the C:\inetpub\mailroot\Badmail
folder. This folder will have details of the issue. At first I did not have the messages using the
authenticated Office 365 user and got a bounced message similar to below:
For this test from AX I used this bad message returned to confirm that the sending user in AX must be
an authenticated user in Office 365.
14
Configuring Dynamics AX to use Windows SMTP Server
Now that we have messages successfully sending from the SMTP server sitting in Azure we can easily
configure Dynamics AX to use this server to distribute mail messages. Since the SMTP server is
running on the same virtual machine you only need to specify the current server name. You also
need to specify a user that has access to the Local SMTP server. This user does not have to be a valid
Office 365 user and should be local to the domain and machine that is running the SMTP service.
15
Don’t forget to set a batch group on the general tab. This will be used when we launch the batch job
to distribute alert email messages.
Next set the Alert template in the Alert parameters under Organization Administration, Setup, Alerts,
and Alert parameters.
16
For the test just make sure you have a valid external email address in File, Tools, User Options.
17
In our example we will create an alert rule every time the credit limit is changed. Create the Alert
rule as follows and select to send e-mail.
Normally you would be running an alert processor batch job. For this simple test navigate to the AOT,
forms and open the Tutorial_EventProcessor and click the start button. While running the label on
the Start button will change to Stop.
Now let’s edit a customer credit limit and test the email sending. After you change the credit limit
you get the processing window.
18
Within a few seconds you will see the Alert message from within the AX rich client.
In order to actually send the message we need to run the eMail Distributor batch job.
19
A few minutes later the message is sent to my regular company email account external to the local
image. Success!
http://www.uxceclipse.com.au/Pages/Blog-Detail.aspx?newslist=Blog%20List&itemId=69
20
21
Now go ahead and change the credit limit again. You will see the alert message from AX.
A few minutes later you will get the email alert message from the Gmail SMTP relay. Success again
this time using Gmail as the mail relay server!
22