Use Multiple Gmail Accounts for Sending Emails from D365FO

We have noticed that many organizations who use D365FO would like to send the reports from various Gmail accounts (e.g. sales, accounting, procurement, human resources) to their customers, vendors or employees. Unfortunately, D365FO enables you to create only one SMTP account, and Gmail does not allow you to send emails using account username and password due to security reasons.

In this article, we will show you how you can overcome these issues and email reports from D365FO using multiple Gmail accounts at a high level of security.

Setting the SMTP Account in D365FO for Sending out Reports

In D365FO System administration > Setup > Email > Email Parameters, you can define and save the default SMTP account for sending emails and reports via the SMTP Settings fast tab.

The same settings can be accessed via Docentric workspace Docentric AX parameters > Emailing > Default email sender account > Email parameters SMTP Settings or via modules Organization administration > Docentric AX parameters > Emailing > Default email sender account > Email parameters SMTP Settings.

If you now use these settings for sending out reports from D365FO, you will receive an error "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required." You have received this error because Gmail, by default, does not allow you to send emails via SMTP using the mailbox username and password. They are your only restriction preventing attackers from hijacking your account.

Connection Security Setting for Gmail Account

There is a way to overcome this problem by setting your Gmail account to use the "Less secure apps" security level for access. To change the security level, go to the Gmail Account Settings > Security > Less Secure App Access and turn the access ON.

Don’t Settle for Less Secure Access to your Gmail Account

Since most of you will not settle for decreased security level to send your emails, we will show you another better way to use your Gmail account more securely. Go to your Gmail account Security section again (if you previously turned the Less Secure App to ON, then turn it OFF again). First, ensure that the 2-Step verification is enabled.

Then generate additional Application Passwords related to the main Gmail account we used in D365FO as the default SMTP Settings. Select the app and device of your choice, and a new application password will be generated in the next window. Using this new generated password with your account, you increase the security level of the Gmail account. If anyone steals your credentials, you can just generate a new password. The attacker cannot hijack your account with the application password.

This example has been done using a free Gmail account. However, similar applies also to the Gmail Business or Enterprise account.

Copy the generated password and enter it in D365FO settings.

Note that the sender address used in this example is a system default account for sending all the emails out from D365FO. Next up, we will show you how you can specify additional email sender accounts.

Use Additional Email Sender Accounts

While D365FO enables just one sending address, Docentric provides the possibility to define multiple sending addresses (the From field in the Print Destination Settings form), but these »From« addresses have to be pre-registered in the Docentric setup for Additional email sender accounts. Different sender addresses can be helpful to distinguish the emails from various departments (e.g., Sales, HR, R&D, Finance, Logistics, etc.).

The Additional email sender accounts functionality is also applicable for all outgoing emails from D365FO such as Retail, Alert and Workflow email notifications.
This feature is part of Docentric AX Free Edition. You can check what else is there for FREE here.

Before you can send out your emails using additional email sending accounts, go to Docentric AX parameters > Emailing > Additional Email Sender Accounts and set up the addresses of all the sender accounts you plan to use to send the reports. The display name can be the name of each department, as shown in the screenshot below.

Do not forget to generate the Application Passwords for each account, as already shown in the section before. The generated passwords in Gmail accounts should be entered into the Password field.

Learn more about multiple sender addresses when emailing reports in D365FO >>

Final Thoughts

Using Docentric additional email sending accounts is a simple and convenient way to enable the usage of different Gmail accounts in D365FO for free. We hope they will simplify your work process, and the right people in your organization will receive back replies from your vendors, customers, or employees and respond faster to finish the job.

Leave a Reply

Your email address will not be published. Required fields are marked *


Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>