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.
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.
Copy the generated password and enter it in D365FO settings.
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.).
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.
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.