Set up as a Windows service
Step-by-step guide to running Automatic Email Processor as a background Windows service
This guide shows how to set up Automatic Email Processor as a Windows service that runs continuously in the background - without a user being signed in or the program window being open. This is the right operating mode for servers and for machines that should process email around the clock.
The service uses the program AEPProcessor.exe, which is installed next to the regular program. From then on you only start the main window occasionally, to maintain profiles or review the logs.
At a Glance
- Difficulty: Advanced (administrator rights required)
- Time required: approx. 15 minutes
- Prerequisites: Installed program, a Windows user account for the service, an elevated command prompt
- Result: Automatic Email Processor processes email continuously in the background, even with no user signed in
Note: This guide covers the most common case - running as a classic Windows service. Other operating modes (NSSM, scheduled task, headless mode) and all command-line parameters are described in the program help, chapter 60.3 - Service mode and headless mode.
Step 1: Choose a dedicated account for the service
Create a dedicated Windows user account for the service (or use an existing user or domain account). The service will later run under this account.
Do not use the “Local System” account. The reason: sign-in data and permissions in Windows are always tied to a specific user. When the service runs as “Local System”, it cannot reach exactly these things:
- the sign-in to Microsoft 365 (the consent granted once is only valid for the user who granted it)
- saved account passwords (stored in the Windows vault per user)
- network printers (printer shares are set up per user)
In addition, the main window would otherwise permanently show the message “External processor not active”, even though the service is in fact working correctly - because the window and the service only recognize each other when both run under the same user.
Recommendation: Set up a dedicated account such as AEP-Service and give it a password that does not expire.
Step 2: Set up the program once under this account
Sign in to Windows once with the service account and start the regular program (AutomaticEmailProcessor.exe). Set everything up here completely:
- Add your email accounts and verify them with “Send/receive test message…” (see How to set up an IMAP account or set up a Microsoft 365 account).
- Enter your license.
- Create or import your profiles and verify them with a test run.
This step matters: account sign-ins and the license are stored for exactly this user account. The service can later only use what was set up here under its account.
Step 3: Enable the “External processor” option
So that the main window and the service do not get in each other’s way, enable the matching option - still signed in as the service account:
Open Options → Processing and, at the very bottom under External processor, tick “Use external processor (e.g. Windows service)”.
“Use external processor” option in the program options under Processing
What this option does: The main window assumes that the service handles processing. It therefore no longer starts or stops a processing process of its own and serves only for configuration and for showing the logs. Without this option, the window would start its own processor on every launch and get in the service’s way.
Then close the program with OK.
Step 4: Install the service
Open an elevated command prompt (Run as administrator) and create the service with sc.exe. Adjust the path to AEPProcessor.exe to your installation location (the default is C:\Program Files\Automatic Email Processor 4) and enter your service account from step 1 at obj=:
sc.exe create "AEP4Service" binPath= "\"C:\Program Files\Automatic Email Processor 4\AEPProcessor.exe\" --service"
sc.exe config "AEP4Service" obj= ".\AEP-Service" password= "YourPassword"
sc.exe config "AEP4Service" start= auto
binPath= points to AEPProcessor.exe with the --service parameter.
obj= is the user account the service runs under - exactly the account under which you set everything up in steps 2 and 3. For a local account write .\AccountName, for a domain account Domain\AccountName.
start= auto makes the service start automatically when Windows boots.
Important: There is a space after each of binPath=, obj=, password= and start= - that is how sc.exe requires it.
Step 5: Start the service and verify
Start the service:
sc.exe start "AEP4Service"
Then check that everything is running:
In the Windows Services console (services.msc), “AEP4Service” should have the status “Running”.
If there are problems, the file ServiceDiagnostics.log helps. It is located in the application data folder of the service account:
%AppData%\Automatic Email Processor 4\ServiceDiagnostics.log
It contains the startup messages and - during operation - the entry IsWindowsService=True. If it says IsWindowsService=False, the service is not running as expected.
The regular processing and error logs appear, as usual, in the main window under Log.
Step 6: Ongoing operation
From now on, the service processes email continuously in the background - regardless of whether a user is signed in. You only start the main window when needed, to change profiles or view logs; the actual processing stays with the service.
If you later want to stop or remove the service:
sc.exe stop "AEP4Service"
sc.exe delete "AEP4Service"
Common problems
| Problem |
Solution |
| The main window reports “External processor not active” even though the service is running |
The service and the main window must run under the same user account. In services.msc, check under “Log On As” that the account from step 1 is shown there - not “Local System”. |
| The service starts and stops again immediately |
Open ServiceDiagnostics.log in the AppData folder of the service account (see step 5) - it states the reason, often a missing license or an unreachable data folder. |
| The Microsoft 365 account keeps asking for sign-in in the service |
The sign-in must have been done once under the service account in the main window (step 2). Sign in to Windows with the service account and perform the sign-in there. |
| A network printer does not work in the service |
Printer shares apply per user. Connect the printer once under the service account, then the service recognizes it too. |
| “Local System” was selected |
This choice does not work reliably (see step 1). Switch to a real user account with sc.exe config "AEP4Service" obj= ".\AEP-Service" password= "…". |
| Processing runs twice |
Most likely the “Use external processor” option is not set (step 3), so the main window processes as well. Tick the box and restart the window. |
Try Automatic Email Processor free for 30 days ...
Download