How to Automatically Move Incoming Emails Between IMAP Folders
As a business, sometimes you may need to sort incoming emails by different IMAP folders.
For example, if all emails come to the same email account, it is reasonable to move support tickets to the folder checked by the support team, orders – to the folder monitored by the sales department, marketing emails – to the promotions folder etc. Your inbound email stream could be well organized and each department would not waste time for searching their messages in dozens or even hundreds emails in the Inbox.
The criteria to differentiate email messages can be some text in the Subject line or body, or sender email address, or the To email address.
Sorting emails manually by folders is a challenge when you receive a lot of messages each day.
But using G-Lock Email Processor you can automate this process.
Click here to download the 30-day trial version if you don’t have it yet.
Follow the steps below to create a rule to move emails to different IMAP folders.
Click on the “New Rule” on the menu bar.
Enter a rule name.
Choose the rule execution mode: on every message.
Click “Select” and choose an email message that you will use the debug the rule. You can save a message in the .eml format in advance.
Add the Field Extractor to the rule to extract the message Subject where
Source: Header field – Subject.
Add the Fields Processor to the rule.
Copy-paste the code below to the Fields Processor. You can add and remove code blocks yourself depending on how many folders you want to sort incoming emails by.
if pos('Ticket#', Subject)> 0 then
IMAP_Folder_to_Move := 'Tickets'
if pos('Word2', Subject)> 0 then
IMAP_Folder_to_Move := 'INBOX.Archive'
if pos('Word3', Subject)> 0 then
IMAP_Folder_to_Move := 'folder2'
Replace Ticket#, Word2 and Word3 with the real text or words from the Subject.
Replace Tickets, INBOX.Archive and folder2 with real full names of the folders as they exist on the server.
You can copy the full names of the folders from your Email Account settings.
Click on the “Retrieve” button, click on the folder and copy the folder full name from the field. Paste the folder name in the Fields Processor.
To leave email messages that were not processed by the rule, use the same folder in the Email Account settings as the folder you retrieve emails from and as the folder you move the emails to.
G-Lock Email Processor is a powerful data parser and extractor for processing incoming emails.
Try it for free and move incoming emails to different IMAP folders automatically!
We had been using G-Lock processor for some time with out any problems. Our provider sadly made some changes that broke the connection to G-lock.
G-lock support was fantastic and took a backup of our system and restored it and debugged the problem really quickly. They promptly remoted in and fixed the problems with our system.
Impressed and appreciated - Thank you Julia & Co
Interested? Learn more about our email parsing software for Windows.
- How to Collect Data from Inbound Emails and Insert It into MS Access Database
- How to Build a PDF Report with Data Extracted from the Database
- How to Automatically Parse CSV Attachment to Database