This post shows how to save emails and attachments to folders with rules, step by step. It is the complete walkthrough of PRO Rules in Mail Attachment Downloader 4.0, the main reference that the other posts link to.
The Free edition saves each account’s attachments, emails or both into one folder, named one way. You set that on the account’s Account rule tab, on its Folders and file names page. The PRO Rules editions, PRO Rules Client and PRO Rules Server, go further: each kind of email can have its own folder, its own file names and its own steps after saving. PRO Rules Server can also run all of this 24×7 as a Windows service, on a PC, a server or a cloud VM, with nobody signed in.
In this post
The tool in this guide: Mail Attachment Downloader PRO RulesSee PRO Rules
The idea: one rule for each save location
To save different emails to different folders, make one rule for each folder. Each rule says:
- which emails it takes (its conditions),
- where it saves them and how the files are named,
- what happens next (its steps).
For example: invoices from Acme go to \\fileserver\Finance\Invoices\Acme, purchase orders from Northwind go to \\fileserver\Finance\Orders, and scanned receipts are made searchable and uploaded to SharePoint.
PRO Rules: an overview
Rules live in the PRO Rules tab. In version 3.x this tab was called Global filters. Tick Use PRO Rules for every account at the top of the tab: from then on, the rules decide what each account downloads, instead of each account’s Search, Filters and Folders and file names pages. When you turn it on, the program offers to move your Account rules into PRO Rules, one rule per account, and shows you each rule first.

Rules run from the top of the list down, for each attachment, and for the email itself when a rule saves it. Each rule has five parts, which the Rule Editor shows top to bottom:
- Which emails: the conditions that decide whether the rule runs. Otherwise the rule is skipped.
- Fields to find: values read from the email, such as an order number, for the file names and the steps.
- Save: what is saved, in which folder, and how the files are named. The folder and name can use the values found.
- Then: the steps that run after saving, in order.
- If something fails: the steps that run when a step above fails.
Rule tips and common questions
- One account only: a new rule runs for every account. To keep a rule to one account, add an Account condition to it and pick the account, for example finance@contoso.com.
- Several accounts in one run: pick <multiple@multiple> in the Account box, click Choose accounts… and tick the accounts. The rules run for each of them. See multiple email accounts with multiple rules.
- First match wins: each file is saved by the first rule that matches it, and the rules below it never see that file. The next attachment of the same email starts again from the top, so it can go to another rule.
- Change the order: drag a rule up or down, or select it and use Rule settings › Move in the list (or press Alt+Up and Alt+Down).
- Similar rules: right-click a rule and choose Duplicate, then change the copy. If many rules share the same conditions, make a Shared filter with those conditions once and add the rules under it (right-click it › Add a rule under this shared filter). See chained rules and actions.
Name your rules well
With many rules, good names save time. Say a rule called “Invoices” runs for one account only, because it has an Account condition. Call it “finance@contoso.com – Invoices” instead. Then type finance@contoso.com in the Search box above the list to see only that account’s rules. The search also finds rules by kind, account and save folder.
Create a rule
Click New rule… in the PRO Rules tab. The Rule Editor opens. Type a name in Rule name: first. The left side shows the rule’s outline: click a part to change it on the right.

Prefer plain words? Pick Create using AI… from the arrow next to New rule…: describe the rule, and the AI writes it for you to test before saving.
Which emails: the conditions
Click Which emails, then Add a condition. You can match on From, To, Subject, Body, Attachment name, Mailbox folder, Account, the received dates, the size, the number of attachments, Email security and more.
Say the rule should save invoices and payment advice. Add a Subject condition and type:
'Payments' OR 'Invoices'
- OR: the rule runs when the subject has “Payments” or “Invoices” anywhere in it.
- AND: all the words must be there, anywhere in the subject.
- NOT: leaves emails out, for example
'Invoices' AND NOT 'reminder'. - = before a value matches only that whole value, and !! before a .NET regular expression uses the expression.
To combine conditions, put them in an Any of these group (OR) or an All of these group (AND). Click Test the expression… to try a condition on a sample text before you save. Conditions match the text as you type it: they don’t fill in fields such as {DATE}.

Fields to find: values from the email
A rule can read values out of the email, such as an order number, and keep them in a field in curly braces, such as {ORDER_ID}. Find them By pattern, By pointing at it in a sample, or With AI. The folder, the file name and the steps can then use them.
To read values from many similar emails or files, the Parser (PRO Parser and up) is the better way. More in extract data from emails and attachments.
Save: what, where and how it’s named
Click Save in the outline.
- Rule type: leave it at Global rule (saves, then runs its steps) for a rule that saves files. The other types are for shared filters, shared actions and rules for emails nothing saved: see catch-all rules.
- What to save: The attachments, The email and its attachments, The email only (an .eml file), or Nothing: back up only.
- Save folder: for example
\\fileserver\Finance\Invoices. Missing folders are made for you. - File name: a new rule starts with
{FILENAME}_{ID}{EXT}. Click Fields… to add more fields, such as the sender or the date. - Only files of these types: keep only documents, pictures or the types you list, such as
.pdf, .xlsx.
Important: with the Windows service (PRO Rules Server), use a network path such as \\fileserver\Finance in the save folder, not a mapped drive letter: the service can’t see mapped drives.

Folders and file names from fields
Fields fill in values from each email. Some examples:
\\fileserver\Finance\Invoices\{EMAIL_FROM}makes a folder for each sender’s address.\\fileserver\Finance\FY2026-Q3\{ORDER_ID}makes a folder for each order number your rule found.{DATE[yyyy-MM-dd]}_{FILENAME}_{ID}{EXT}puts the email’s date in front of each file name.
Keep {ID} in the file name. It is the message’s ID with the part number, so each file gets its own name, even when two emails both send invoice.pdf.
The full list of fields, with date formats and more examples, is in customizing file names and email data with fields.
Two more choices on the same page: Also save the email’s text and HTML parts saves the email’s text as .txt and .html files, and Leave out the pictures inside the text skips logos and signature images.
Then: steps after saving
After a file is saved, the rule can do much more. Click Add a step…, find the step by its group or by searching, and click Add. Steps run in order, and a step can hold steps that work on its result.

Some examples:
- Archive the email: Move or copy the email to a folder on the mail server once its files are saved.
- Invoice data: Add a row to a spreadsheet (Excel or Google Sheets) with the values found. See invoice processing.
- Other systems: Upload to cloud (OneDrive, SharePoint, S3 and more) or Send to document management (Laserfiche, M-Files, DocuWare).
- Databases: Save to a database, or Store CSV / SQL to load the rows of Excel or CSV attachments. See save emails and attachments to a database.
- PDF and other formats: Convert documents to PDF, and with PRO Rules Server to 50+ formats such as multi-page TIFF, plus Merge PDFs, Split PDF and Make PDFs searchable (OCR).
- Your own programs: Run a script or Run a command line on each saved file.
- Tell someone: Send an email, Forward the email or Send notification (Slack, Teams and more) when a certain kind of email arrives.
PRO Rules Client converts to PDF only. Sending email, notifications, Unzip, OCR, Merge PDFs, Split PDF, databases, scripts, web hooks and AI prompts are PRO Rules Server steps. See all PRO features.
Test the rule before it runs
Click Test this rule… in the Rule Editor and pick some emails. Nothing is changed: files go to a temporary folder, and steps such as moving, deleting or sending are only described. Then click Save.
When you have several rules:
- Rule settings › Test all rules… runs the rules that are on, in the list’s order, and shows which rule saves each file.
- Rule settings › Check rule order… finds rules that never save anything because a rule above them takes their files, and offers to move them.
- After a real download, the Downloads tab shows which rule saved each file.
- Still puzzled? Open Diagnostics in the PRO Rules tab, tick Rule tracing and download again. Show the traces… then shows which condition matched and which didn’t. Turn it off when you are done: it slows downloads.

Make a rule for each folder
Repeat this for each kind of email: one rule per save location, each with its own conditions, folder, file name and steps. Then click Connect and Download, or schedule it on the Schedule tab.
Running the Windows service? It keeps the copy of your rules it got when it was installed. After you change a rule, open Schedule › Service schedule and click Reinstall…. See the PRO Rules Server how-to.
New in 4.0: each account has a History. It remembers the emails it has seen, so nothing is downloaded twice, and a step that failed is tried again on its own.
Uses and scenarios
Many businesses use “magic folders”: a scanning, capture, OCR, invoice processing or document management product watches a folder and picks up each new file. PRO Rules feed those folders from email, one folder per kind of document, with the names those products expect. Where 4.0 has a direct connector, such as Upload to cloud, Send to document management or a database step, you can skip the folder and send the file straight there.
Related
- PRO Rules and the Rule Editor
- Filter features in PRO Rules: one account, rule order, catch-all rules
- Download from multiple email accounts with multiple rules
- Customizing file names and email data with fields
- Save emails and attachments to a database
- Download emails for invoice processing
- Save emails and attachments as PDF
- PRO Rules editions
- Plans and prices
Questions or suggestions about this post? Contact us.