Update December 11, 2019: This post has been updated with screenshots from Acumatica 2019 R2 and the latest recommended way to authenticate with Gmail using an app password.
Last week I wrote in general about the Acumatica email engine (click here). This week I’d like to go further and cover something more specific related to email in Acumatica.
Acumatica can act as an email client, just like Microsoft Outlook. It just needs to connect to an email server (Office 365, Microsoft Exchange, Gmail, Yahoo, AOL, a politician’s closet 🙂 , etc.).
In order to test out the Acumatica email functionality, I think it’s easy to use a Gmail account. Why? Because if you don’t have one you can easily create a free account on Gmail.com without having to call your IT department.
Once you have a Gmail account, setting it up in Acumatica is actually very easy. How easy?
Step 1: Go to your Google Account and create an App Password
1. Click here to access the Security tab of your Google Account
2. Turn on 2-Step Verification using the screenshots below, then go through the prompts to connect your Google account to your cell phone number.
3. Click on App passwords and go through the prompts to generate the app password. Make sure you copy the app password in the orange box in the 3rd screenshot to a secure place because you won’t be able to see it again.
Step 2: System Email Accounts (SM204002) -> SERVERS tab
This is the only screen you need in order to setup your Gmail account in Acumatica.
Use the screenshot below to populate the SERVERS tab, noting the following fields:
1. Email Address: Use your Gmail account, not mine 🙂
2. Reply Address: Use your Gmail account, not mine 🙂
3. Root Folder (on Server): I set this to Inbox in the screenshot so Acumatica will see all emails sent to this email account, but you could change this to be any of your mail folders to restrict Acumatica to only read email that is put in that folder.
4. Username: Use your Gmail account, not mine 🙂
5. Password: Use the app password that you created in Step 1
Step 3: System Email Accounts (SM204002) -> ADVANCED SETTINGS tab
Use the screenshot below to populate the ADVANCED SETTINGS tab, noting the following fields:
1. Username: Use your Gmail account, not mine 🙂
2. Password: Use the app password that you created in Step 1
Step 4: System Email Accounts (SM204002) -> INCOMING MAIL PROCESSING tab
Use the screenshot below to populate the INCOMING MAIL PROCESSING tab:
You actually don’t HAVE to activate Incoming Mail Processing if you only want Acumatica to send emails and not receive them, but you’d be missing out on the coolest part of the Acumatica email engine (in my opinion). I definitely recommend setting it up to at least give it a try.
I picked the E-Mail Support Common Response template for sending an automatic “we got your email” response to the sender of the email, but you could leave this empty, pick any available template, or easily create your own using the Notification Templates (SM204003) screen.
The most interesting part of the INCOMING MAIL PROCESSING tab (I think) is the MAIN PROCESSING section where you can have Acumatica do something with the email.
Click here for a cool Hackathon project that I participated in where we customized Acumatica to read incoming emails and turn them into AP Bills.
Another thing to note about the MAIN PROCESSING section is that it could be used in conjunction with the Root Folder (on Server) field from Step 2. You could create multiple folders (Gmail calls them “Labels”) in your Gmail account, maybe something like this:
- Acumatica – Create a New Case
- Acumatica – Create a New Lead
Then you could follow the steps on this page to setup your email account multiple times. Just make sure to use a new Account Name each time like “Gmail Create New Case” and “Gmail Create New Lead”. Then you could associate each of your mail folders (labels) to just one action under Main Processing. That way you would know that Acumatica would only do one thing with your email when you put it in a folder (label) within Gmail. Of course, if you do want Acumatica to do multiple things, just add multiple labels to the email within Gmail.
Step 5: Click the Save and TEST buttons
This allows Acumatica to ensure that it can connect to Gmail. You should see a green checkmark show up next to the ACTIONS button if everything is ok.
Additionally, you’ll receive an email in your Gmail inbox with a subject of “Test”.
Congratulations! You’re Done!
Wasn’t that easy?
Processing a Test Email
Now we should process a test email to make sure that everything is working.
1. Send an email to your Gmail account. You can send it to yourself from your Gmail account or use another email account to do the sending.
2. Use ACTIONS -> Receive All on the System Email Accounts (SM204002) screen to have Acumatica check for new mail.
When this is done, you should get a green check mark next to the ACTIONS button like we got in Step 5.
3. Go to the Incoming (CO409000) screen in Acumatica and you’ll see the email. Click the blue hyperlink to open the email.
From here you can Forward, Reply, Reply All, all the stuff that you’re used to doing with email, just like working with email in Outlook.
Email Scheduling in Acumatica
You probably don’t want to have to manually select the ACTIONS -> Receive All option every time you want Acumatica to see your email. So, navigate to the Send and Receive Email (SM205020) screen to setup a schedule for sending/receiving email.
Click the watch icon on the top and click the Add button like this.
You can get pretty fancy with the schedules, but I normally set this to process every 1 minute.
Setting Your Default Acumatica Email Account
Each user can set the default email account that gets used when Acumatica sends email. You might setup each user’s email account in Acumatica or have shared email accounts (maybe one per department).
Use the User Profile (SM203010) screen to set your default email account:
If you’re paranoid about a user selecting someone else’s email account and using it to send email on their behalf from Acumatica (ok, maybe not paranoid, a legitimate concern), then you can use row level security on the Email Account Access (SM201050) screen to determine which email accounts a user can see.
Note about error using Gmail with Username/Password
If you try to use your regular Gmail username and password, you will get the following error when you click the TEST button:
The mail send has failed.
535-5.7.8 Username and Password not accepted. Learn more at
If you don’t want to generate an app password like we did in Step 1, you can use a less secure (not recommended) setting, by doing the following:
Access your Google account (click here) and click Security -> Turn on access (not recommended)
But this isn’t recommended for production Gmail accounts. Follow the instructions in Step 1 of this post for the most secure method of authenticating with Gmail.