Mail Attachment DownloaderVersion 4.0Version 3.x

Save emails and attachments to folders: PRO tips and tricks

PRO tips for saving emails and attachments to folders: how rules work, testing and tracing, multiple accounts, PDFs, databases and nested steps.

The Save part of a rule with the default file name {FILENAME}_{ID}{EXT} and an example of the saved file's path below it

Saving emails and attachments to folders is easy with the PRO editions of Mail Attachment Downloader 4.0: PRO Backup, PRO Parser, PRO Rules Client and PRO Rules Server.

The PRO features page lists everything the program can do. This post picks out the tips people ask about most. Follow the links for the details.

PRO Rules and the parts of a rule

The key PRO idea is the rule. In 4.0, rules are in the PRO Rules tab (PRO Rules is the new name of 3.x’s Global filters). Tick Use PRO Rules for every account and the rules decide for all your accounts.

Rules run from the top down, for the email and for each attachment. When a rule takes one, it saves it, reads any values you asked for, then runs its steps. In the Rule Editor, each rule has these parts:

  • Which emails: the conditions that decide whether the rule runs.
  • Fields to find: values read from the email, cleaned up as needed.
  • Save: the attachments, the email or both, in a folder and file name that can use the values you read.
  • Then: the steps that run after saving, to automate the rest of the work.

More: PRO Rules overview and moving to PRO Rules, step by step.

Test and troubleshoot rules like a PRO

Rule not doing what you expected? Try these, in order:

  • Test this rule… in the Rule Editor, or Test all rules… in the PRO Rules tab. They show which rule saves each file, and nothing is moved, deleted or sent.
  • After a download, the Downloads tab shows which rule saved each file.
  • Rule settings › Check rule order… finds rules that a rule above them hides.
  • Rule tracing: in the PRO Rules tab, open Diagnostics, tick Rule tracing and download again. Then click Show the traces… to see, for each email and file, which rules matched and which condition didn’t. Tracing slows downloads, so turn it off when you are done.
The Rule trace viewer in its tree view: an Acme invoice email, the rules Acme invoices and Northwind statements not matched, and All PDFs matched and saving the file
Rule tracing: which rule matched each file of a real download, and which didn’t.

Still stuck? Search the knowledge base, or send us a bug report from the program.

Mail server connection tips

  • Set up your account: click Add account › Email account…, pick your provider, and the settings are filled in from your email address. See recommended settings.
  • Sign in with your browser for Gmail, Google Workspace, Outlook.com and Microsoft 365: no password is stored. See signing in with your browser. Yahoo, iCloud and others need an app password: the setup guide walks you through it.
  • Test Connection before you add rules or schedule downloads.
The account window for ap@contoso.example with Microsoft 365 picked and sign-in in the browser
Pick your provider, then click Test Connection to sign in.

Still having connection or sign-in problems?

  • A firewall, proxy or antivirus can block the connection or the sign-in. Open Connection diagnostics (in Settings › Logs and support): it shows each stage and warns when something inspects the traffic. Then check with your IT support.
  • See connection issues, and search the knowledge base for proxy settings and more.

License activation or moving a license

  • Activate: copy the fields from your license email exactly into the License tab and click Validate. No internet on that system? Use Activate offline….
  • Move to another system: enter your license there. If all its computers are in use, click Free a computer… and pick the one that no longer needs it.

See activate your license, or move it.

Running for multiple accounts

Pick <multiple@multiple> in the Account box, click Choose accounts…, tick the accounts and click Validate and use selected. PRO Backup runs up to 3 accounts together, PRO Parser up to 5, and PRO Rules Client and PRO Rules Server as many as you have. If one account fails, the others still run.

Choosing invoices@acme.example and purchases@acme.example to run together
Tick the accounts to run together, then Validate and use selected.

Read more: multiple email accounts with PRO Rules and download from several accounts at once.

PDF tips: save emails or attachments as PDF

Add Convert documents under Then to turn the email or its attachments into PDF (PRO Rules Client and up). PRO Rules Server converts to 50+ formats, such as multi-page TIFF and Word, and adds Convert all files to a single PDF, Merge PDFs, Split PDF and Make PDFs searchable (OCR).

The Rule Editor with a Merge PDFs step that joins the email's saved PDF files into one named by month
Merge PDFs joins an email’s saved PDFs into one file (PRO Rules Server).

Read more: save emails and attachments as PDF.

Extract data like the invoice number

The Parser tab (PRO Parser and up) reads values out of emails and their attachments. Highlight the invoice number in a sample, or describe it in words and let AI find it. Use it in the folder and file name, such as {SUPPLIER}\{INVOICE_NUMBER}_{FILENAME}{EXT}, or send it to CSV, Excel or Google Sheets.

The Parser with an Acme invoice sample and the invoice number, dates, total and supplier highlighted as fields
Highlight a value once, and the Parser finds it in the next emails.

For a quick field inside a rule, PRO Rules Client adds Find fields with AI. Read more: extract data from emails and attachments and PRO Parser.

Save extracted data to a database

With PRO Rules Server, Save to a database adds a row with the values you read to any ODBC database, such as SQL Server, MySQL or PostgreSQL. Store CSV / SQL loads the rows of Excel or CSV attachments.

A Save to a database step inserting the invoice number, supplier, date, total and saved file into dbo.Invoices
Save to a database: one row for each saved file.

Read more: save emails, files and invoice data to a database and the blog post.

Nest rules and steps like a PRO

Nest steps. Steps under Then run in order, and a step can hold steps that work on its result. For example, Unzip an attachment, then convert each file inside to PDF and save it to a database (PRO Rules Server).

Chain rules (PRO Rules Client and up). One shared filter picks the emails, and the rules under it each do one job with them. You write the condition once instead of repeating it in many rules. A rule can also start another with the Run another rule step.

The PRO Rules tab with a Supplier invoices filter and two rules under it: Upload to SharePoint and Save to the accounting database
A shared filter (1) with two rules under it (1.1 and 1.2).

Read more: chained rules and actions.

Related