Detect spoofed invoice emails with SPF, DKIM, DMARC and look-alike domain checks

Detect spoofed invoice emails automatically: check SPF, DKIM and DMARC results and look-alike domains, save invoices that pass and flag the rest.

To detect spoofed invoice emails automatically, check who really sent each one before its invoice is saved. Mail Attachment Downloader’s Email security condition reads the SPF, DKIM and DMARC results your mail server wrote into the email, and spots look-alike domains such as acrne.example for acme.example. A rule then saves only the invoices that pass, and sends the rest to a review folder with a notification.

Fake invoices and “our bank details have changed” emails are a common way to steal money from a business. They look like they come from a supplier you know. This post shows how to stop them from slipping into your invoice folder, spreadsheet or accounting system unseen. The examples use Contoso’s mailbox finance@contoso.com and invoices from Acme, Northwind and Fabrikam.

What does the Email security condition check?

You turn on the checks you want. An email passes when it passes all of them:

  • Authenticated: the SPF, DKIM and DMARC results. Choose SPF, DKIM or DMARC passes, or one of them alone: DMARC passes, DKIM passes or SPF passes.
  • Display name: Must not show a different address than the real sender. This catches “billing@acme.example” written in the name of an email that really comes from somewhere else.
  • Reply-To: Must be on the same domain as the sender. A reply to a fake invoice shouldn’t go to a stranger’s mailbox.
  • Look-alikes: the domains you trust, separated by commas. A sender whose domain looks like one of them does not pass: letters swapped, dropped or added, “rn” for “m”, or a zero for an “o”.

The program doesn’t redo the mail server’s checks: it reads the results the receiving server wrote into the email’s headers. A pass shows the sending domain is genuine, not that the email is safe.

Mail Attachment Downloader's Email security condition on the rule Supplier invoices: Authenticated DMARC passes, the display name must not show a different address, Reply-To on the sender's domain, and the trusted domains acme.example, northwind.example and fabrikam.example for the look-alike check
The Email security condition: DMARC, display name, Reply-To and look-alike domains in one place.

Which result should you ask for: DMARC, DKIM or SPF?

DMARC passes is the strictest. DMARC ties the check to the domain in the From address you see, which is the one a fraudster fakes. Ask for it when your suppliers’ domains publish a DMARC policy.

SPF, DKIM or DMARC passes is the default and the safer start: a supplier without DMARC still passes when SPF or DKIM does. Add Look-alikes to it, because a fraudster can make SPF and DKIM pass for a look-alike domain they own.

What you need

  • PRO Rules Client for the Email security condition and moving emails on the mail server.
  • PRO Rules Server for the Send notification step and running as a Windows service.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM.

Step 1: Save invoices only from senders that pass

  1. On the PRO Rules tab, click New rule… and name it “Supplier invoices”.
  2. Under Which emails, click Add a condition and add the invoices: “invoice” in the subject, or the account finance@contoso.com.
  3. Click Add a condition again and choose Email security. Set Authenticated, tick Display name and Reply-To, and type your suppliers’ domains in Look-alikes: acme.example, northwind.example, fabrikam.example.
  4. Leave Picks on Emails that pass the checks.
  5. Under Save, save the attachments to \\fileserver\Finance\Invoices.
The Rule Editor's Which emails section with the Add a condition button and conditions such as Mailbox folder, Received on or after, Received before, Account and an Any of these group of From and Subject
Which emails: add the Email security condition with Add a condition, beside the rule’s other conditions.

No result decides what happens to an email whose headers have no SPF, DKIM or DMARC result. Some accounts, such as POP3 accounts, don’t add any. For invoices keep Count the email as not passed, so an unchecked email goes to review instead of straight through. Tick Subdomains must match too if a Reply-To on another subdomain of the sender’s domain should fail as well.

Step 2: Send failures to a review folder and a notification

Make a second rule, “Suspicious invoices”, with the same conditions, but set Picks to Emails that do not pass the checks. The two rules never pick the same email.

  1. Under Save, choose The email only and a folder such as D:\Finance\Review, so the reviewer has a copy.
  2. Under Then, click Add a step…, open Email and add Move or copy the email. Pick the Account and a Folder such as “Invoice review”. The email leaves the inbox, so nobody pays it by mistake.
  3. Add Send notification from Notify, and pick a channel: Microsoft Teams, Slack, email or another one set up under Settings › Sources › Notification Channels. Put {FROM} and {SUBJECT} in the message so the team sees which email it is.
The Move or copy the email step in the Rule Editor: account ap@contoso.example, folder Processed invoices, Leave a copy in the original folder ticked, Run Once per email, and List the folders
Move or copy the email moves an email to another folder of its mailbox. For a review folder, untick Leave a copy.
The Add a step window with Notify chosen: Send notification, which tells you in Teams, in Slack, by email or through a web hook
Add a step › Notify › Send notification tells the team about a suspicious invoice email.

Test the checks before you trust them

Click Test this rule… and Run test. The rule runs on your recent emails without changing anything, and each email that fails says why, such as Skipped: not authenticated or Skipped: look-alike domain.

Have a suspicious email saved as a file? Test an email file… tries the rule’s Email security conditions on an .eml or .msg file, with no mailbox, and shows each check as passed or not. Use the email file as it was received: an email forwarded as an attachment has usually lost its authentication results.

The Test rule window: accounts and folders of ap@contoso.com, a list of tested emails from Acme Billing, Northwind Traders and Fabrikam Purchasing with their results, the reasons for the selected email, and the buttons Run test, Open in trace viewer and Test an email file
Test this rule shows what the rule would pick and why. Test an email file… tries the Email security checks on a saved email.
Test rule Supplier invoices: three invoices Matched, one from billing@acrne.example Skipped: look-alike domain, one Skipped: not authenticated, and the trace showing acrne.example resembles acme.example
Test the rule first: the look-alike sender acrne.example is skipped, and the trace says why.

Once the rules run, tick Rule tracing under the PRO Rules tab’s Diagnostics to record each check of each email.

More invoice fraud protection: checks on the invoice itself

A genuine supplier’s mailbox can be broken into, and then its emails pass every sender check. So check the invoice too. With the Parser (PRO Parser and up), reading invoices from email, add these on its Checks step:

  • Duplicates: tick The same, pick the invoice number and the supplier, and choose Skip it and note it or send it to review. The same invoice sent twice isn’t paid twice.
  • Bank details you don’t know: give the IBAN field the check In a list, with the IBANs your suppliers gave you, written as the invoices show them, and Send to review under If it fails. An invoice asking you to pay a new account waits for a person.
  • Unusual amounts: give the total a range with Between.

An invoice that fails waits in Needs you, and nothing is written, sent or moved for it until someone approves it. E-invoices (Factur-X, ZUGFeRD, XRechnung) carry the IBAN in their own data; for PDFs, build an IBAN field by highlighting it on a sample.

The Parser's Checks step for supplier invoices: a Between 0.01 and 100000 check on the total that sends it to review, the sum checks, a duplicate check on invoice_number + supplier set to Skip it and note it, and the review queue settings, with 3 samples passing
Parser checks against invoice fraud: a range for the total and the duplicate-invoice check. An IBAN field takes the In a list check the same way.

For suppliers that bill on a schedule, Expected emails (PRO Rules Client and up) also tells you when an invoice that should have come hasn’t.

What it doesn’t do

  • It isn’t a spam filter or a virus scanner. It decides what your rules save and where, by who really sent the email.
  • It reads the authentication results your mail server added; it doesn’t look up SPF or DMARC records itself.
  • It doesn’t replace a call to the supplier. When an email asks you to change bank details, confirm on a phone number you already have.

Questions people ask

How do I check the DMARC result of an incoming email?

Your mail server writes it into the email’s Authentication-Results header as dmarc=pass or dmarc=fail. The Email security condition reads that header for you, and Test an email file… shows it for a single saved email.

What is a look-alike domain?

A domain made to be mistaken for a real one, such as acrne.example for acme.example, or acme.co for acme.example. Fraudsters register them so that SPF and DKIM pass. The Look-alikes check compares the sender’s domain with the domains you trust.

Can a spoofed invoice pass SPF, DKIM and DMARC?

Yes, when it is sent from the supplier’s own hacked mailbox, or from a look-alike domain the fraudster owns. That’s why the look-alike check and the Parser’s checks on the invoice belong next to the authentication check.

What if my emails have no authentication results?

Then No result decides. Count them as not passed to send them to review, or as passed and rely on the display name, Reply-To and look-alike checks.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

Alert if email not received: know when an expected email doesn’t arrive

Alert if email not received on time: Mail Attachment Downloader learns when invoices, statements and reports arrive and tells Slack, Teams or email.

A missing email is easy to miss: nothing arrives, so nothing tells you. Mail Attachment Downloader can. Turn on Expected emails for a rule, and it learns when that rule’s emails normally arrive, shows any that are late, and sends an alert to Slack, Microsoft Teams or email when one is not received.

The examples use Contoso’s mailbox finance@contoso.com, invoices from Acme and Northwind, and the channels Finance team (Slack) and Operations (Teams).

Which missing emails are worth an alert?

Any email you count on that comes on a rhythm:

  • Supplier invoices: Acme bills between the 1st and the 3rd of each month. A missing invoice means a late payment or a missed discount.
  • Bank statements: on the first business day of the month, for the month-end close.
  • Daily reports: the sales report that a system emails every weekday at 7:00.
  • Backups that email a log: a server backup that sends “Backup completed” each night. If the email doesn’t come, the backup may not have run.
  • Orders and files from partners: a weekly order list or price file from Northwind.

What you need

  • The edition: Expected emails is part of PRO Rules (PRO Rules Client, PRO Rules Server).
  • A rule for the emails: the rule that picks them, such as invoices from acme.example. Most people already have one that saves the attachments.
  • History on for the account: how often the emails arrive is read from History, so the rule needs some emails behind it to learn from.

How to get an alert if an email is not received

1. Open the rule

On the PRO Rules tab, pick the rule, such as “Supplier invoices”, and click Edit. New to rules? Save emails and attachments to folders walks through a first one.

2. Turn on Check for missing emails

In the Rule Editor, click Expected emails and tick Check for missing emails. The rule shows what it learned, for example “Monthly, days 1 to 3, about 9:00 AM. Learned from 11 emails.”

  • Split by: Sender, Sender’s domain, Folder or a field. One rule for all supplier invoices then tracks Acme and Northwind each on their own, since they send at different times.
  • Late after (minutes): how long after its usual time an email may come before it counts as late, such as 30.

Click Save. Nothing is done for emails that were due before you turned it on.

Expected emails in the Rule Editor of Mail Attachment Downloader for the rule Supplier invoices: Check for missing emails ticked, Monthly, days 1 to 3, about 9:00 AM learned from 11 emails, Split by Sender, Late after 30 minutes, and If an email is missing with 3 steps
Expected emails: the rule learned that Acme’s invoices come on days 1 to 3 of the month.

3. Choose what happens if an email is missing

Click If an email is missing. A missing email is always shown in the Downloads tab. Up to three steps can do more, each a number of minutes after the email is late (Minutes after it is late; 0 runs it at once):

  • Send a notification: a message to a channel, such as Finance team (Slack), Operations (Teams) or a mailbox.
  • Call a web address: tells another system, such as your ticket system, or a script that waits for web calls.
  • Email the sender: asks the sender to send it, from the rule’s mail account. Draft the email with AI writes the subject and message for you to read and change.

A typical set: notify Slack as soon as Acme’s invoice is late, email Acme a day later, and tell Teams if it still hasn’t come. A title or message can use {RULE}, {SENDER}, {DUE} and {LAST}; left empty, the step says the plain facts.

The program doesn’t nag. A sender whose emails have stopped is acted on for three emails in a row, an email to the same sender goes at most once every few days, and never while a rule is still learning.

Mail Attachment Downloader's Rule Editor on If an email is missing for the rule Supplier invoices: first a notification to the Finance team channel at once, then an email to the sender after 1440 minutes asking for the invoice, then a notification to Operations after 2880 minutes
If an email is missing: up to three steps, each a number of minutes after the email is late.

How does it know when an email is late?

It learns from the emails the rule has already handled: which days and about what time they come. Until it has seen enough, the rule shows Learning. Under More options you can also say it yourself:

  • How often: Use what was learned, Every day, Weekdays, Every week, Monthly, on days of the month, Monthly, on a business day from the start or Monthly, on the last business day, with a Usual time (hh:mm).
  • Holiday calendar: days the sender’s country keeps aren’t expected (United States, United Kingdom, Canada, Germany or Australia).
  • Days not expected: a supplier’s summer closing, for example.
  • Pause until: nothing is expected before a date.
  • Suggest with AI: describe the rhythm in words, such as “Invoices arrive on the second business day of the month”, and the AI suggests the pattern.

The defaults for every rule, such as when an email counts as late and how often senders may be emailed, are on the Schedule tab › Expected items.

Where you see a missing email

At the top of the Downloads tab, a notice says how many expected emails are missing and from which rules. Click See them for the list: the rule, who it was Expected from, when it was due, when the last one came, and what was done so far. For each one you can:

  • Search the mailbox now: runs the account at once, in case the email came late.
  • Received elsewhere: it came another way, such as by post. Nothing more is done.
  • Not expected that day: that day becomes a day off for the rule.
  • Stop expecting: a supplier you no longer use.
Missing email notification in the Downloads tab of Mail Attachment Downloader: 3 expected emails are missing, from the rules Supplier invoices (2) and Weekly sales report (1), with a See them link
The Downloads tab shows missing emails, rule by rule.

On the PRO Rules tab, the Expected column shows Late or Missing next to the rule.

The Missing list in the Downloads tab: three expected emails missing, from Acme Billing and Northwind Traders for the rule Supplier invoices and the Weekly sales report, with what was done so far and the buttons Search the mailbox now, Received elsewhere, Not expected that day, Stop expecting and Open the rule
The Downloads tab lists each missing email, what was done about it, and what you can do next.

Set up Slack, Teams or email notifications

Channels are set up once and shared by missing-email alerts, run summaries and error alerts. Open Settings › Run summary and click Configure Channels…. The Notifications window takes nine kinds: Slack, Microsoft Teams, Discord, Google Chat, Telegram, ntfy, Pushover, a custom webhook and email. Give each a name, paste its webhook address or fill in its details, and click Send test message.

The Notifications window of Mail Attachment Downloader with nine notification channels for missing email alerts: Finance team (Slack), Operations (Teams), Telegram, Discord, Google Chat, ntfy, Pushover, a custom webhook and Finance mailbox (email), with Send test message
Notification channels: set up once, used for alerts and run summaries.

Expected emails tells you what didn’t come. A Run summary tells you what did: after each download, how many emails and files were saved and what went wrong, sent always, or only when there were problems. Together, you hear about both. See Run summaries.

Run summary settings: send a summary when a run ends Always, to Finance team (Slack) and Operations (Teams) as Short and Finance mailbox (email) as Detailed, for 2 of 3 accounts
Run summaries: a short report to Slack or Teams after each download.

Missing files, too

A rule of a watch works the same way with Check for missing files. If the backup writes its log to a folder or a network share instead of emailing it, watch that folder and be told when tonight’s file doesn’t appear.

Questions people ask

Can I get an alert if an email is not received by a certain time?

Yes. Set a Usual time (hh:mm) and Late after (minutes). With a usual time of 07:00, Late after 30 and a notification at 0 minutes, you hear about it at about 7:30.

Does it work with Gmail and Microsoft 365?

Yes. It works with the accounts the program downloads from with History on: Gmail and Google Workspace, Microsoft 365 and Outlook.com, Exchange, and other IMAP mailboxes.

Does the program have to be running?

The checks are made by Mail Attachment Downloader, so keep it running. To check around the clock, even when nobody is signed in, install the Windows service of PRO Rules Server.

What if the sender changes the day?

With Use what was learned, the rule keeps learning from new emails. Or set the day yourself under How often.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

MCP server for email attachments: let AI agents read your downloads

MCP server for email attachments: let GitHub Copilot, Claude Code or any AI agent ask what was saved, what failed and what needs you. Read-only, local.

Mail Attachment Downloader has a built-in MCP server for your email attachments. Switch on AI agents, and GitHub Copilot in Visual Studio Code, Claude Code, Gemini CLI or any other MCP agent on the same system can ask which files were saved, which downloads failed and which accounts need you. It only reads, it is off until you turn it on, it listens on your own system only, and an agent needs a token.

The examples use Contoso’s mailboxes finance@contoso.com and ap@contoso.com, invoices from Acme and Northwind, and the parser Supplier invoices.

What can you ask an AI agent about your email downloads?

MCP (Model Context Protocol) is the way AI agents call tools. With the server on, you ask in your own words and the agent picks the tool. For example:

  • “Which invoices from Acme were saved this week, and in which folder?”
  • “Did any downloads fail since Monday? Why?”
  • “Which accounts need me to sign in again?”
  • “How many files did each rule save in the last 7 days?”
  • “How is the Supplier invoices parser doing, and what is waiting for review?”

It saves you opening the program to look, and it lets an agent use the answer in the work it is doing, such as a report or a script that reads the saved files.

What you need

  • The edition: any PRO edition, from PRO Backup up. The Parser tools come with PRO Parser and up.
  • The program open: the server runs in Mail Attachment Downloader’s window, not in the Windows service. While the window is open it also reads what the service downloaded.
  • An agent: on the same system, one that speaks MCP over HTTP: GitHub Copilot in VS Code, Claude Code, Gemini CLI or another.

How to turn on the MCP server

  1. Open Settings › Sources › AI Agents (MCP server), pick AI agents (MCP) and click Edit….
  2. Tick Let AI agents on this computer ask what I’ve downloaded (MCP server).
  3. Keep the Port (17820) unless another program uses it. A Token is made for you; Show and Copy it, or New token… to replace it.
  4. Under What agents may see, choose what to share (below).
  5. Click OK. The server starts at once.
MCP server for email attachments: the AI agents window of Mail Attachment Downloader with Let AI agents on this computer ask what I've downloaded ticked, port 17820, a hidden token, What agents may see, and Copy VS Code setup, Copy Claude Code command, Copy Gemini CLI command and Copy address and token
The AI agents window: on, local, with a token, and you choose what agents see.

Connect GitHub Copilot, Claude Code or Gemini CLI

Under Connect an agent, one click copies what each agent needs:

  • GitHub Copilot in VS Code: Copy VS Code setup copies the server’s entry for VS Code’s mcp.json, with the address and the token. Paste it in, start the server in VS Code, and ask Copilot in agent mode.
  • Claude Code: Copy Claude Code command copies a claude mcp add command to run once in a terminal.
  • Gemini CLI: Copy Gemini CLI command copies the matching gemini mcp add command.
  • Any other MCP agent: Copy address and token. The address is http://127.0.0.1:17820/mcp, and the token goes in an Authorization: Bearer header.

What you copy holds the token: keep it to yourself, as you would a password.

What can an AI agent read?

Seven tools tell an agent about your downloads, from the same History the Downloads tab shows:

  • Status: the version and edition, whether a download is running, the accounts and the latest runs.
  • Accounts and runs: the accounts set up, and for each run who started it, how it ended, files saved and failed.
  • Search saved files: by words, account, rule, run or time, or only the problems.
  • Summary: counts for the last days, by account and by rule.
  • Needs action: accounts that can’t download until you fix something, such as an expired sign-in or a save folder that can’t be reached, with what to do.
  • Rules: what your rules do, in plain words: which emails, what they save, where, and the kinds of their steps.
AI agent read email downloads: the History of saved files in Mail Attachment Downloader, with invoices such as INV-2026-0412.pdf saved to D:\Finance\Invoices, their size, date processed, status Saved or Replaced, the rule and the run
What an agent searches: the saved files, where they went, and how each one ended.

With PRO Parser and up, six more tools cover the Parser: the parsers and their fields, one parser in detail, its health (how often each field was found), what waits for review, the latest results, and a test of a parser’s patterns on a text the agent gives.

The Results of the Supplier invoices parser in Mail Attachment Downloader: invoice number, supplier, due date and total read from emails from Acme, Northwind, Fabrikam and Contoso, each Done
The values a parser read: hidden from agents unless you allow them.

What agents may see, and what they never see

You decide under What agents may see, and a change counts at once:

  • Who sent each email, who it went to and its subject: off, they are neither shown nor searched.
  • The full path of each saved file (off: only its name).
  • What my rules do (their conditions, folders and kinds of actions): also needed for the Parser tools.
  • Let agents read the values the parsers read out of emails: off by default, as names, amounts and addresses can be personal data. Then at most 50 records at a time.

Never shared: the text of your emails, the files themselves, passwords, connection details, and where a rule or parser sends data. File names, times and the status of each download always are.

Keep in mind that what an agent reads goes to the AI model the agent uses, as any tool result does. Share only what you are happy for that model to see.

What it can’t do

The server only reads. No tool starts a download, changes a setting, touches a file, or approves or rejects an email waiting for review. An agent can’t make the program do anything; it can only ask. To run downloads on a timetable, use the Schedule tab.

The Mail Attachment Downloader main window with Connect and Download and the Downloads tab listing invoices and purchase orders from ap@contoso.example, each Saved 1 file
Downloads still start here or on the schedule: agents only look.

How the MCP server is protected

  • Local only: it listens on 127.0.0.1, so nothing on the network can reach it, and web pages in a browser can’t call it.
  • A token: a long random token, kept encrypted for your Windows user, never in the settings or the logs. New token… replaces it at once.
  • Careful with what agents send: an agent’s questions are treated as untrusted, and answers are limited in size.
  • Off means off: when it is off, nothing listens.

Microsoft Copilot Studio and Microsoft 365 Copilot

Copilot Studio agents and Microsoft 365 Copilot run in Microsoft’s cloud, so they can’t reach an address on your own system. To use one, you have to make the address reachable from the internet yourself, such as with a Microsoft dev tunnel or a reverse proxy you control, then add it in Copilot Studio as an MCP server with the token as its key. Think it over first: whoever has the token and can reach the address can read what you allowed. Using it with Microsoft 365 Copilot and Copilot Studio… in the window explains it.

Questions people ask

Can the agent start a download or change a rule?

No. It can only read. To change a rule with AI, use the AI Assistant in the program.

Can GitHub Copilot read my email?

Not the text of your emails or the files. It sees file names, times and statuses, and senders and subjects if you allow it.

Does it work in the free edition?

No. AI agents need a PRO edition, from PRO Backup up.

Does it work when the Windows service downloads?

Yes, while the program’s window is open: it reads the service’s History too. The service itself doesn’t run the MCP server.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

Extract data from email with AI: ChatGPT, Claude, Gemini or a local model

Extract data from email with AI: name invoice fields in plain words, read them with a local model, ChatGPT, Claude or Gemini, and review doubtful values.

To extract data from email with AI, you say in plain words what to look for, such as “the invoice number” or “the date payment is due”, and an AI reads it out of each email and its attachments. Mail Attachment Downloader does this in its Parser, with a built-in AI that runs on your own system or with your own OpenAI (ChatGPT), Anthropic Claude, Google Gemini or Azure OpenAI account. It shows where each value was read and how sure the AI is, and holds doubtful emails for you to check.

The examples use Contoso’s mailbox finance@contoso.com and invoices from Acme, Northwind and Fabrikam, such as INV-2026-0412.

How does AI data extraction from email work?

  • You name the fields in words: “The invoice number”, “The supplier’s name”, “The total to pay”. No patterns, no templates per supplier.
  • One AI call per email: the AI reads the subject, the sender, the body and the text of the attachments (PDF, Word, Excel and text files) and fills all the fields at once.
  • Each value is checked against the text: you see where it was read and how sure the AI is. A value that isn’t in the text is flagged.
  • The values become fields: {INVOICE_NUMBER}, {TOTAL} and the others name files and folders, and go to CSV, Excel, Google Sheets or a database.

What you need

Local AI or ChatGPT, Claude and Gemini: choose the AI

The AIs are set up once in Settings › Sources › AI Providers; each parser and step then picks one. Edit… opens a provider: its Key, its Default model (Refresh list asks the service which ones it has), Make this the default AI, and Test provider, which asks one tiny question with no email or file.

The built-in AI: local document extraction

The built-in model runs on this computer, with limited rights. Nothing leaves the computer, and it costs nothing. Get it once in the AI Assistant (beta) tab with Download (about 2.2 GB). It is slower than the cloud services and reads text only: the program takes the text out of PDF, Word and Excel attachments for it, but it can’t look at pictures.

Local AI for document extraction: the AI provider window for the Built-in AI model (on this computer), Make this the default AI ticked, nothing leaves this computer and it costs nothing, Test provider
The built-in AI: nothing leaves this computer.

Your own AI server

Ollama, LM Studio, or any server that speaks the OpenAI-style chat API, such as OpenRouter, Mistral or Groq. Enter its address, such as http://localhost:11434, and the model’s name, such as qwen3:8b. A server on this computer keeps everything here.

OpenAI (ChatGPT), Anthropic Claude, Google Gemini, Azure OpenAI

Use your own account and API key. For OpenAI that is a key from the OpenAI platform, not a ChatGPT subscription. The key is kept encrypted on this computer and sent only to that provider. Azure OpenAI uses your own Azure resource and its deployment.

ChatGPT email parser setup: the AI provider window for OpenAI with the Key box, an API key from the OpenAI platform not a ChatGPT subscription, Default model, Refresh list, Make this the default AI and Test provider
A cloud AI uses your own key, kept encrypted on this computer.

Step by step: describe the fields in the Parser

  1. On the Parser tab, click New parser and add a few sample emails, such as three invoices from Acme, Northwind and Fabrikam.
  2. In the Fields step, add a field Using AI. Under Look for, write what it is in your own words, pick its Type (text, number or date), and choose what happens If not found or wrong.
  3. Under What the AI reads, tick the parts: Subject, Sender and date, Body, Attachments’ text and, for scanned invoices, Scans (OCR).
  4. In Notes for the AI, add what helps, such as “Dates are day/month/year. Amounts are in EUR.”
  5. Pick the AI and click Run on all (here, all 3 samples).

On the right, each sample shows its values, how Sure the AI is, and whether the value is in the text. Answers are kept, so changing one field does not ask the AI again. Not sure what to ask for? Suggest fields lets the AI propose the values your samples have.

Extract data from email with AI in the Parser of Mail Attachment Downloader: four plain-words fields, the invoice number, the supplier's name, the date payment is due and the total to pay, read by the built-in model at 98% sure and found in the text, with What the AI reads, Notes for the AI, Hybrid mode and Compare models
Fields in plain words: the built-in model read three invoices on this computer.

Hybrid mode: patterns first, the AI only for the gaps

Tick Hybrid mode to Use patterns first, ask the AI only for fields they leave empty. A field found by a highlight or a pattern can also have If the pattern finds nothing, ask the AI. Most emails are then read by the pattern, which is instant and free, and the AI is asked only where the pattern finds nothing, such as a new supplier’s layout.

Compare models: which AI reads your emails best?

Click Compare models… and add the models to try. Run on the samples asks each one, and marks it against the values you ticked as right:

  • how many of each field it got right, such as 3 / 3 for the invoice number,
  • Time per email, and
  • Cost per 1,000 emails, an estimate from the size of your samples and the prices you type in. The real bill comes from the provider.

A setup to try proposes a mix, such as the built-in model first and OpenAI only for the emails where a field is empty or less than 80% sure. Use this setup keeps it: the cloud sees only the gaps.

Compare models in the Parser: the built-in model on this computer and OpenAI gpt-4o-mini marked against checked values for invoice number, supplier, due date and total, with time per email, cost per 1,000 emails and A setup to try with Use this setup
Compare models: the built-in model and a cloud model on the same three samples.

Confidence and review: doubtful values wait for you

In the Checks step, tick The AI is less sure than under Send an email to the review queue when, and set a percentage, such as 70. You can also review when a required field is blank or a check fails, such as a total outside the range you set.

A held email waits in Needs you. Nothing the parser writes, sends or moves is done for it until you approve. Open it to see the email beside its values, each with the AI’s percentage, correct a value and click Approve and run the actions (Alt+A), Skip for now (Alt+S), or Reject: do not process (Alt+R).

AI confidence review in Needs you: an invoice from Litware whose supplier was read with 58% confidence, the email's text beside the values for invoice number, supplier, due date and total, and Approve and run the actions, Skip for now and Reject
Needs you: the supplier was read with 58% confidence, so the email waits for a person.

AI in a PRO Rule: Find fields with AI and Run an AI prompt

For a quick field inside a rule, add a step with Add a step… › Data and fields:

  • Find fields with AI (PRO Rules Client and up): the same plain words, in the Fields found with AI window, with What the AI reads and Which AI reads it. The fields name files and folders, and feed the steps after it.
  • Run an AI prompt (PRO Rules Server): your own prompt about the email or its files, such as “Summarize this contract in three lines” or “Is this an invoice, a reminder or a credit note?”. The answer is kept as a field. Test the prompt tries it on a sample email.

The built-in model reads text files only in Run an AI prompt (TXT, CSV, JSON, HTML), not pictures or PDFs. The cloud services read pictures and PDFs too.

Find fields with AI step: the Fields found with AI window with the fields Invoice number, Due date and Total including tax described in plain words, What the AI reads ticked for subject, sender, body and attachments' text, and Notes for the AI
Find fields with AI: plain-words fields inside a PRO rule.
The Run an AI prompt step in the Rule Editor: AI model Use the default (Built-in model), nothing leaves this computer, the built-in model reads text files only, a Prompt box with Ideas and Fields, Send files, Save the answer in and Test the prompt
Run an AI prompt: the answer becomes a field for the next steps.

What leaves your computer?

  • Built-in model, or your own server on this computer: nothing.
  • A cloud AI: the parts you ticked under What the AI reads, or the prompt and the files you chose, sent to that provider only. Its terms for your account apply.
  • Never without asking: before a cloud AI is used, the program names the provider and what would be sent, and asks. It asks again when you change the service. You can go back to the built-in model at any time.

Questions people ask

Can I use ChatGPT as an email parser?

Yes, with an API key from the OpenAI platform. A ChatGPT subscription doesn’t include one. Pick OpenAI in AI Providers, then in the parser.

Does the local AI need the internet?

Only for the one-time download. After that the built-in model reads your emails on this computer.

Can it read scanned invoices?

In the Parser, tick Scans (OCR) so scans are read before the AI is asked. Find fields with AI reads the text of PDF, Word, Excel and text files, not images or scans.

How do I know the AI got it right?

Every value shows its percentage and whether it is in the text. Compare models tells you which AI is right most often on your own emails, and review holds the doubtful ones. See Extract data from emails and attachments for highlights, patterns and tables.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

Save email attachments to SharePoint, OneDrive, S3, Dropbox or Google Drive automatically

Save email attachments to SharePoint, OneDrive, Amazon S3, Google Drive, Dropbox, SFTP or a NAS automatically, in folders named from the email.

Many teams want invoices, contracts and receipts from email in SharePoint, OneDrive or a cloud bucket, not in a mailbox. Mail Attachment Downloader puts them there. A rule picks the emails, saves the attachments, and its Upload to cloud step sends each saved file to a folder in your cloud storage, in subfolders and with names built from the email.

New in version 4.0. The examples use Contoso’s mailbox finance@contoso.com and invoices from Acme.

Which cloud storage can you save email attachments to?

One step works with all of these:

  • Microsoft: OneDrive (personal, work or school) and SharePoint document libraries, Online and on-premises.
  • Amazon S3 and S3-compatible storage: Wasabi, Backblaze B2, Cloudflare R2, DigitalOcean Spaces, Google Cloud Storage (with an HMAC key), MinIO and others.
  • Azure Blob Storage.
  • WebDAV: Nextcloud and ownCloud, pCloud, Koofr, Yandex Disk, a Hetzner Storage Box, a Synology or QNAP NAS, or any WebDAV server.
  • File servers: SFTP, FTPS (FTP over TLS), and a network share (SMB) with its own sign-in.
  • Google Drive and Dropbox: through your own Google Cloud or Dropbox app (more on that below).

What you need

  • The edition: PRO Rules Client or PRO Rules Server. Upload to cloud is a step in a PRO rule, so Free, PRO Backup and PRO Parser don’t have it.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM. No Outlook needed.
  • The mailbox: Gmail, Google Workspace, Microsoft 365, Outlook.com, Exchange, or any IMAP or POP3 mailbox, added with Add account.
  • The storage: an account at the service that may write to the folder or bucket.

Step 1: Connect your cloud storage once

Open Settings › Sources › Cloud Connections. Add each service or server once, with a name; rules then pick the connection by name, so many rules share one sign-in.

  1. Click Add… and choose the service.
  2. Fill in what it asks for (see the list below) and give it a Connection name, such as “Finance SharePoint”.
  3. Click Test, then OK.
The Cloud connections window with five connections: Finance SharePoint (SharePoint), Google Drive, Office share (Network share), Partner SFTP (SFTP) and Wasabi (S3), and the buttons Add, Sign in again, Edit, Test, Rename, Show rules and Remove
Cloud connections: add each service once. Rules pick a connection by its name.

What each service asks for:

  • SharePoint and OneDrive: your Microsoft account. Sign in… opens Microsoft’s sign-in in the browser; sign in and accept. No password is kept.
  • S3 and S3-compatible: pick the Provider (Amazon S3, Wasabi, Backblaze B2, Cloudflare R2…), then the Endpoint, Region, Access key ID and Secret access key of a user that may list, read and write the bucket.
  • Azure Blob Storage: the Storage account and its Account key, or a SAS token for one container.
  • WebDAV: pick the Provider, such as “Nextcloud or ownCloud”, and enter the Server URL, User name and an app password where the service has them.
  • SFTP and FTPS: the Server, Port, User name and a password (SFTP can use a private key). The first Test shows the server’s host key or certificate to check and accept. Plain FTP isn’t offered: it sends the password unencrypted.
  • Network share: the Share, such as \\fileserver\Finance, with its own user name and password. Nothing is mapped to a drive letter.

Google Drive and Dropbox: with your own app

Google Drive and Dropbox connect through an app you make in your own Google Cloud or Dropbox account. It takes a few minutes. The window says what to do, and How to create one opens a guide.

  • Google Drive: in the Google Cloud console, enable the Google Drive API, publish the OAuth consent screen (or the sign-in stops working after 7 days) and create an OAuth client ID of type “Desktop app”. Paste its Client ID and Client secret, or use Load both from the downloaded JSON file…, then click Sign in….
  • Dropbox: in the Dropbox App Console, create a Scoped access app with Full Dropbox, tick files.content.write and files.metadata.read, and copy the App key. Click Sign in…, allow access, paste the code Dropbox shows into Code and click Continue.
The New Google Drive connection window: what to set up in the Google Cloud console, the How to create one link, Client ID and Client secret boxes, Load both from the downloaded JSON file, Sign in, and the connection name Finance GoogleDrive
A Google Drive connection uses your own Google app: paste its ID and secret, then sign in.

Later, Sign in again renews a sign-in that stopped working, and Show rules lists the rules that use a connection.

Step 2: Add the Upload to cloud step to a rule

New to PRO Rules? Save emails and attachments to folders walks through a first rule.

  1. On the PRO Rules tab, click New rule….
  2. Under Which emails, click Add a condition, for example the sender’s domain acme.example, or “invoice” in the subject.
  3. Under Save, choose what to save and where, such as the attachments to D:\Finance\Invoices. The upload sends these saved files.
  4. Under Then, click Add a step…, open Other systems and double-click Upload to cloud.
The Add a step window with Other systems chosen: Upload to cloud, Send to document management, Send for signature, Send to Zapier and Web hook, and Add it: Then
Add a step › Other systems › Upload to cloud.

Now set up the step:

  1. In Cloud connection, pick the connection. Manage… opens Cloud connections if it isn’t there yet.
  2. Next to Destination, click Browse… and choose the folder: the site, library and folder in SharePoint, the bucket and folder in S3, the container in Azure Blob, a folder on the server or share. New folder makes one.
  3. Run is For each saved file: each attachment the rule saves is uploaded.
  4. Click Test upload. It uploads a small test file to the destination and deletes it again, so you know the connection and the folder work.
  5. Click Save.
The Choose a folder window for an S3 connection: the bucket acme-invoices with the folders Suppliers, Customers, Statements and Archive, Suppliers chosen, the address acme-invoices/Suppliers and a New folder button
Browse… shows the folders of the connection, here an S3 bucket.

Subfolders and file names from the email

Open More options on the step to build the path in the cloud from fields, such as the date, the sender or the subject. Click Fields… next to a box to pick one.

  • Subfolders: folders inside the destination. {DATE[yyyy]}/{DATE[MM]} files each invoice under its year and month, such as Suppliers/2026/04. Folders that aren’t there yet are made. Left empty, files go straight into the destination.
  • File name: left empty, the file keeps the name it was saved with. {FROM}_{FILENAME}{EXT} puts the sender in front of the attachment’s name.

Characters a service doesn’t accept are replaced, and a name that is too long is shortened.

The Upload to cloud step in the Rule Editor of a rule named Supplier invoices: Cloud connection Invoices archive, Destination acme-invoices › Suppliers, Run For each saved file, Subfolders {DATE[yyyy]}/{DATE[MM]}, File name {FROM}_{FILENAME}{EXT}, If the name is taken Keep both (add a number), and the Test upload and Diagnostics buttons
The Upload to cloud step: an S3 bucket, a folder for each year and month, and the sender in each file name.

When a file with the same name is already there

If the name is taken decides what happens:

  • Keep both (add a number), the default: the new file gets a number added to its name. Nothing is overwritten.
  • Replace it (new version): the new file takes the place of the old one.
  • Skip the upload: the file already there stays, and the step counts as done.
  • Fail the step: the step fails, and the Downloads tab shows it.

More options worth knowing

  • Keep no local copy: tick Delete the saved file after the upload.
  • Email details as SharePoint columns: for SharePoint and OneDrive, tick Add the email’s details as columns and choose them with Details…, such as the sender and the subject. They show in the library’s views and search.
  • Steps after the upload: steps inside Upload to cloud can use {CLOUD_URL}, {CLOUD_PATH} and {CLOUD_FILENAME}, such as a link to the file.
  • When an upload fails: a busy or offline service is tried again a few times. Diagnostics… shows what went wrong.
  • Nothing uploaded twice: each account’s History remembers the emails it has handled, so the next run doesn’t upload the same email again.

Before you turn the rule on, click Test this rule… to see which emails it picks.

What leaves your computer

  • Only what the step uploads: the files the rule saved (and, for SharePoint and OneDrive, the email details you chose as columns) go straight from your own system to the service you picked. There is no Gearmage cloud in between.
  • Secrets stay encrypted: access keys, passwords, private keys and sign-in tokens are kept encrypted on this computer, never in the settings or the logs. Diagnostics keep times, results and errors, never passwords or tokens.

Upload around the clock as a Windows service

Uploads run whenever the rule runs: on the program’s schedule, or as soon as new email arrives. To run 24×7, even when nobody is signed in, install the Windows service with PRO Rules Server: Schedule › Service schedule › Install service. Two things to know:

  • Reinstall after a change: the service uses the connections it copied when it was installed. After adding or changing a connection, or signing in again, click Reinstall… so the service gets the change.
  • Network shares: the service runs as Local System, which can’t open most shares. Add the share as a Network share (with its own sign-in) connection with a user that may write to it.
The New Network share connection window: why a share needs its own sign-in when the service runs as Local System, the Share box (\\server\share or \\server\share\folder), user name OFFICE\uploader, password and the connection name Finance NetworkShare
A network share with its own sign-in, for a service that runs as Local System.

More on the service: save Outlook attachments to a network folder automatically.

The other way round: watch a cloud folder

PRO Rules Client can also watch a SharePoint library, OneDrive, an S3 or S3-compatible bucket, or a network share, and send each new file through your rules. The other services can be uploaded to, but not watched yet. See watch SharePoint, OneDrive and S3.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

What’s new in Mail Attachment Downloader 4.0

Mail Attachment Downloader 4.0 adds email backup with PST export, an AI parser for invoices and e-invoices, PRO Rules, watches and cloud upload.

Mail Attachment Downloader 4.0 is out (build 1080, 24 November 2026). Mail Attachment Downloader is a Windows program that downloads email attachments and saves emails from Gmail, Microsoft 365 and any IMAP mailbox to your own folders, then automates what happens next. 4.0 is its biggest release yet: a new 64-bit program with a new window, five editions, email backup, an AI parser for invoices, and rules that reach cloud storage, document systems and databases.

Here is what is new, feature by feature, with the edition that has it. For how it compares with other email automation tools, read Mail Attachment Downloader PRO as your email automation tool.

A new main window with tabs and dark mode

One button, Connect and Download, starts a run and stops or resumes it. Tabs hold the rest: AI Assistant, Downloads, Account rule, Parser, PRO Rules, Backup, Schedule and Settings. All options are on the one Settings tab, with a search box, and Settings › Appearance switches to Dark.

Mail Attachment Downloader 4.0 main window: the Connect and Download button, the tabs AI Assistant, Downloads, Parser, Account rule, PRO Rules, Backup and Settings, and the Downloads tab listing 24 invoice and purchase order emails, each with Saved 1 file
The new main window: one button for Connect and Download, and the Downloads tab with this run’s emails.

The Downloads tab, in every edition, shows Emails or Files, by Runs or History, with filter chips and search. Action required lists any account that can’t download, with a button that fixes it, and an email that saved nothing says why. See the Downloads tab.

History: never download the same email twice

Each account and watch now remembers each email it has seen, so nothing is downloaded or processed twice, even after a restart. A step that fails, such as an upload while the network is down, is tried again by itself. Changed a rule? Redo processes again the dates and folders you choose. Free keeps 1 day of History; the PRO editions keep it as long as you choose. See History and Why did my rule not download the attachment?

Five editions, from Free to PRO Rules Server

Each edition includes everything in the one before it. Each PRO edition comes with a 30-day money-back guarantee.

EditionAccounts per runWhat it adds
Free1Save attachments, emails or both, on demand or daily; 1 day of History; previews of Backup, Parser and PRO Rules
PRO BackupUp to 3Backup, export, restore and import; every schedule and new email as it arrives; run summaries and notifications; AI agents (MCP)
PRO ParserUp to 5The Parser: fields, line items and e-invoices to CSV, Excel or Google Sheets; file and folder names from any value
PRO Rules ClientAny numberPRO Rules and the Rule Editor, AI-written rules, watches, cloud upload, document management, DocuSign, spreadsheet rows, convert to PDF
PRO Rules ServerAny numberWindows service (24×7), databases, webhooks and Zapier, scripts, send and forward email, OCR, merge and split PDFs, AI prompts

Not sure which fits? Try the edition finder, the editions compared or Upgrade your edition.

Gmail, Microsoft 365 and 150+ email providers

Type the email address and the provider is picked for you; then click Test Connection and Save. Gmail, Google Workspace, Outlook.com and Microsoft 365 sign in through your browser, so no password is stored. Microsoft 365 connects through Microsoft Graph, shared mailboxes included (This is a shared mailbox), and Exchange on your own server through EWS. 150+ other providers, from Yahoo and iCloud to GoDaddy and IONOS, are set up for you, and any other mailbox works through IMAP or POP3.

Adding a Microsoft 365 account in Mail Attachment Downloader: provider tiles for Gmail, Outlook.com, Microsoft 365, Yahoo, AOL, Exchange and Other, sign-in in the browser, Microsoft Graph, and This is a shared mailbox ticked
A new account: the provider is picked from the address, and Test Connection signs in through your browser.

See Modern authentication for Microsoft 365 and Google, Download from multiple email accounts and 150+ email providers.

Download new email as soon as it arrives

Free runs on demand or once a day. The PRO editions add every schedule (every 15 minutes, hourly or at a set time) under Schedule › App schedule, and Also download new email as soon as it arrives: IMAP accounts within seconds, Microsoft 365 about every minute. See new email as it arrives.

Back up Gmail and Microsoft 365 email, export to PST (PRO Backup)

The Backup tab keeps an encrypted, searchable copy of each account’s emails on your own system, for as long as you choose. Search it without connecting to the mail server, restore emails or whole folders into the same mailbox or another kind of account (Gmail into Microsoft 365, say), and import old PST, MBOX and .eml files. Daily restore points can go to a network folder, S3 or Azure Blob Storage. The Export page saves emails as EML, MBOX, MSG, PST, PDF or ZIP.

The Export page of the Mail Attachment Downloader Backup tab for finance@contoso.com: the INBOX/Invoices folder ticked and the format list open with EML, MBOX, MSG, PST, PDF and ZIP
Export from the backup: a folder as a PST file, or as EML, MBOX, MSG, PDF or ZIP.

Step by step: Back up Gmail and Microsoft 365 email and Export emails to PST, MBOX, EML or PDF. More on PRO Backup.

Extract invoice data with AI: the Parser (PRO Parser)

The Parser reads values such as the invoice number, supplier and total out of emails and attachments. Highlight a value in a few samples, describe it in plain words for the AI, or use a pattern. It reads line items and checks they add up to the total, and values it isn’t sure about wait under Needs you. Results go to CSV, Excel or Google Sheets, or name your files, such as Invoices\Acme\INV-2026-0423.pdf. With PRO Rules Server, also to a database or a webhook.

The Fields step of the Mail Attachment Downloader Parser: an Acme Office Supplies invoice INV-2026-0412 with the supplier, invoice number, invoice date, PO number, total and due date highlighted, each found in 3 of 3 samples
The Parser: highlight a value once, and it is found in the other samples.

Read ZUGFeRD, Factur-X and XRechnung e-invoices

The Parser reads Factur-X, ZUGFeRD, XRechnung, Peppol and UBL e-invoices from the data inside the file, so fields and line items come out exactly, with no AI. See Process e-invoices from email, Extract data from emails and attachments, Invoice emails to your invoice software and PRO Parser.

Email automation rules: PRO Rules and the Rule Editor (PRO Rules Client)

A rule says which emails it takes (sender, subject, text, dates, folder, attachment name, size, with AND and OR groups), where to save them, how to name the files, and the steps that follow. You build it in the Rule Editor: Which emails, Save, Then and If something fails. Steps can sit inside steps, rules can be chained under a shared filter, and drag and drop sets the order.

The Rule Editor in Mail Attachment Downloader on a rule named Scanned invoices: PDF attachments from a mailbox folder saved to D:\Finance\Scans, then Make PDFs searchable (OCR), Find fields with AI, Save to a database, Web hook, Upload to cloud and Send notification
The Rule Editor: which emails, where to save them, the steps that follow, and what to do if something fails.

Test rules before they go live

Test this rule and Test all rules… run your rules on real emails and show which rule saves which file. Nothing is changed: files go to a test folder, and moving, deleting or sending is only described. Check rule order… finds rules that can never save anything because a rule above takes their files first.

The Test all rules window: five emails from Acme, Northwind, Fabrikam and Contoso in two accounts, four saved by the rules Invoice PDFs and All PDFs and one that matched no rule, with the trace of why
Test all rules: which rule saves which file, without changing anything.

Email security: spot spoofed and look-alike senders

The Email security condition checks the sender’s SPF, DKIM and DMARC results and spots look-alike domains. More: PRO Rules, Save emails and attachments to folders, Filters in PRO Rules and Nesting rules and actions.

Missed email alerts: know when an expected email doesn’t arrive

Some emails you count on: a supplier’s monthly invoice, a bank statement, a daily sales report. With Expected emails, a rule learns when its emails normally arrive (for example “Monthly, days 1 to 3, about 9:00 AM. Learned from 11 emails.”) and tells you when one is late. Tick Check for missing emails, choose whether to split by sender, and set how many minutes late counts as missing.

A missing email is always shown at the top of the Downloads tab, with the rules it belongs to. Under If an email is missing, a rule can also act on it: send a notification to Slack, Teams or email, call a web address, or email the sender. Expected emails is part of PRO Rules (PRO Rules Client and up). See Expected emails.

The Rule Editor of Mail Attachment Downloader on Expected emails for the rule Supplier invoices: Check for missing emails ticked, monthly on days 1 to 3 at about 9:00 AM learned from 11 emails, split by sender, late after 30 minutes, and If an email is missing with 3 steps
Expected emails learns when a rule’s emails arrive and says when one is late.
The Downloads tab of Mail Attachment Downloader with the notice: 3 expected emails are missing, from the rules Supplier invoices (2) and Weekly sales report (1), and a See them link
The Downloads tab shows missing emails, rule by rule.

AI that writes rules and reads documents

Describe a rule in plain words, such as “save the PDF invoices from acme.example into D:\Finance\Invoices and tell the finance team on Slack”, and the AI Assistant (beta) draws it for you to check, test and save. Writing PRO Rules this way needs PRO Rules Client. In rules, Find fields with AI (PRO Rules Client) reads values out of each saved file, and Run an AI prompt (PRO Rules Server) runs your own prompt on what arrives.

The AI Assistant tab of Mail Attachment Downloader with the built-in AI model loaded: a request to save the PDF invoices from acme.example into D:\Finance\Invoices and tell the finance team on Slack, and the rule it drew
The AI Assistant turns a sentence into a rule you can check, test and save.

The built-in AI model runs on your own system, and nothing you type or test is sent anywhere. Or use your own AI server (Ollama, LM Studio, any OpenAI-compatible service), OpenAI, Anthropic Claude, Google Gemini or Azure OpenAI with your own key. A cloud AI is never used without asking you first. See your choice of AI.

Watch folders, SharePoint, OneDrive and S3 (PRO Rules Client)

A watch works like an email account, but its source is new files: a folder or network share, SharePoint, OneDrive, Amazon S3 or S3-compatible storage, or completed DocuSign envelopes. Each new file goes through your PRO Rules like an attachment, with History and Redo. A new watch takes only what arrives after it is saved, unless you tick Also take the files already there. PRO Rules Server adds database tables, Slack and Microsoft Teams channels. See Watches.

The Watch window for a folder or network share in Mail Attachment Downloader: folder \\nas\scans, run as soon as something changes, 60 seconds between checks, include the folders inside it
A folder watch on a scanner share: each new scan runs through your rules.

Save attachments to SharePoint, OneDrive, S3 and business systems

  • Cloud storage (PRO Rules Client): Upload to cloud sends each saved file to OneDrive, SharePoint, S3 and S3-compatible storage, Azure Blob, WebDAV, SFTP, FTPS, a network share, Google Drive or Dropbox, with subfolders and names from fields.
  • Documents and signatures (PRO Rules Client): Send to document management files documents in Laserfiche, M-Files or DocuWare; Send for signature makes a DocuSign envelope.
  • Spreadsheets and databases: Add a row to a spreadsheet (PRO Rules Client) writes to Excel or Google Sheets; Save to a database and Look up from a database (PRO Rules Server) work with SQL Server, MySQL, PostgreSQL, Oracle or any 64-bit ODBC driver.
  • Webhooks, scripts and email (PRO Rules Server): Web hook, Send to Zapier, Run a script, Send an email and Forward the email.
The Upload to cloud step in the Mail Attachment Downloader Rule Editor: an S3 connection named Invoices archive, destination acme-invoices › Suppliers, subfolders by year and month, and Keep both if the name is taken
Upload to cloud: one step sends each saved file to a bucket, library or folder.

See Upload to cloud, document management, Save emails to a database, Save CSV and Excel attachments to a database, Integrate your business systems and Automate sending emails.

Convert, merge, split and OCR PDFs

Convert documents turns attachments into PDF in PRO Rules Client; other formats need PRO Rules Server, which also adds Merge PDFs, Split PDF (a scanned batch into one PDF per document), Make PDFs searchable (OCR) and Unzip. See Convert emails and attachments to PDF, Merge attachments into one PDF and emails to PDF.

Run summaries: a report to Slack, Teams or email after every download

Know what each download did without opening the program. When a run ends, Mail Attachment Downloader can send a Run summary: how many emails and files were saved, and what went wrong. Choose when to send it (always, only when files were saved or something went wrong, or only when something went wrong), which channels get it, and how much detail each one gets: Short for a chat channel, Detailed for a mailbox. Untick the accounts that don’t need one. A download of several accounts at once sends one summary for all of them, and the Windows service sends summaries too. Run summaries come with PRO Backup and up. See Run summaries.

Mail Attachment Downloader's run summary settings: send a summary when a run ends Always, to Finance team (Slack) and Operations (Teams) as Short and Finance mailbox (email) as Detailed, Dev chat (Discord) off, for 2 of 3 accounts
Run summaries: when to send them, to which channels, and how much detail.

Notifications to Slack, Teams and email (PRO Backup and up)

Set up channels once in the Notifications window: Slack, Microsoft Teams, Discord, Google Chat, Telegram, ntfy, Pushover, a custom webhook or email. The same channels carry run summaries, error alerts, missed email alerts and the Send notification step of PRO Rules Server. See Notifications.

The Notifications window of Mail Attachment Downloader with nine channels: Slack, Microsoft Teams, Telegram, Discord, Google Chat, ntfy, Pushover, a custom webhook and email, the Slack channel selected
Notification channels, set up once for run summaries, alerts and rules.

Ask your AI agent what was downloaded (MCP, PRO Backup and up)

Switch on AI agents and an agent on the same system, such as GitHub Copilot in Visual Studio Code, can ask which files were saved, which downloads failed and which accounts need action. It is read-only, off until you turn it on, local only and protected by a token. Email text and files are never shared. See AI agents.

The AI agents window of Mail Attachment Downloader: the MCP server switched on, port 17820, a hidden token, what agents may see, and buttons to copy the VS Code setup and the Claude Code and Gemini CLI commands
AI agents (MCP): read-only, local only, and you choose what they may see.

Run 24×7 as a Windows service (PRO Rules Server)

On Schedule › Service schedule, Install service runs the program as a Windows service, on Windows 10 or later or Windows Server. It keeps working when nobody is signed in and starts again after a reboot, as the Windows account you choose (a gMSA too). See the service guide.

Mail Attachment Downloader PRO Rules Server, Schedule tab, Service schedule page: install the service for ap@acme.example, check every 15 minutes, auto start on bootup
Service schedule: install the service and set how often it checks.

Coming from 3.x

  • New names: Global filters are now PRO Rules, with their actions as steps in the Rule Editor. Search and Filters are on the Account rule tab, Download History is the Downloads tab, and the Service tab is Schedule › Service schedule.
  • New editions: the old PRO Client and PRO Server become PRO Rules Client and PRO Rules Server; PRO Backup and PRO Parser are new.
  • Side by side: 4.0 installs beside 3.x and copies its accounts, settings and licence once, leaving 3.x as it was. Only one runs at a time, and emails already downloaded aren’t downloaded again.
  • 64-bit only: Windows 10 or later, .NET Framework 4.8, and 64-bit ODBC drivers for databases.
  • Your licence: a 3.x subscription covers 4.0; for a one-time licence, see Upgrade your license.

The 3.x guides are still online: how-to, PRO how-to and service. Every change is in the release notes.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Process e-invoices from email: ZUGFeRD, Factur-X, XRechnung and Peppol UBL

Turn ZUGFeRD, Factur-X, XRechnung and Peppol UBL invoices from email into CSV, Excel or SQL rows, with sum and duplicate checks. No AI needed.

More and more invoices arrive as e-invoices: a PDF with the invoice’s data inside it, or the data alone as an XML file. That data already holds the invoice number, the dates, the supplier, the totals and every line. You shouldn’t have to type it in again, or ask an AI to guess it from the picture.

This post shows how Mail Attachment Downloader’s PRO Parser picks e-invoices out of a mailbox, reads their own data, checks it, and writes it to CSV, Excel or a database, with each invoice file saved under a name that means something.

Why e-invoices are arriving now

Several European countries are making structured e-invoices the norm between businesses. In Germany, businesses have had to be able to receive e-invoices since January 2025, and the duty to send them phases in through 2028. France’s reform began in September 2026, also in phases, and many other countries exchange e-invoices over the Peppol network.

Dates and details change, and they depend on your country and your business. Check the rules that apply to you; this post is not legal or tax advice.

What the Parser reads

The Parser reads the invoice’s own data. It finds it in two places:

  • A PDF with the XML inside it. Factur-X and ZUGFeRD invoices are PDF/A-3 files that carry the XML as an embedded file. You see a normal invoice; the Parser reads the data.
  • The XML alone. An XRechnung or a Peppol invoice is often just an XML file attached to the email. The Parser knows it by what it holds, not by its name.

It reads the two forms that EN 16931, the European e-invoice standard, allows:

  • CII: the UN/CEFACT Cross Industry Invoice, used by Factur-X, ZUGFeRD 2 and XRechnung in its CII form.
  • UBL 2.1: used by XRechnung in its UBL form and by Peppol BIS Billing 3.

Credit notes are read too. The older ZUGFeRD 1.0 is not.

The example

Contoso’s accounts payable team gets invoices at finance@contoso.com. Acme sends Factur-X PDFs, Fabrikam sends XRechnung XML files, and Northwind’s invoices come in as Peppol UBL. We want each one in a spreadsheet, and each invoice file saved in \\fileserver\Finance under its supplier and invoice number.

Step 1: Show the Parser an e-invoice

Open the Parser tab and click “New parser”. In “Source”, choose “Emails from a mailbox” and search for an email with an e-invoice, such as “INV-2026-0423”. Or choose “A file”, or drop the PDF or XML on “Drop files or emails here”.

The Parser's Source step: emails found by searching INV-2026-0423, the email from Acme Beispiel GmbH ticked as a sample and 1 email pinned
Pick an e-invoice email from Acme as the sample.

The step suggests 3 to 25 samples of the same kind. For e-invoices one already gives every field, because the values come from the invoice’s own data, not from learning; a few more let you check the results on several suppliers.

Step 2: Use the invoice’s own data

In “Fields”, when the sample carries e-invoice data, a green banner says so: “This invoice carries its own data. 22 fields and 2 lines found, exact, no AI needed.”

The Fields step of a new parser showing a Factur-X XML invoice, with a green banner: This invoice carries its own data, 22 fields and 2 lines found, exact, no AI needed, and the buttons Use the invoice's data and Choose which
The Parser sees that the sample carries its own invoice data and offers to use it.

Click “Use the invoice’s data”. Each value becomes a field, and the lines become a table. Or click “Choose which…” to tick only the values you want, then “Use the chosen”.

The fields you can get are: invoice number, invoice date, due date, currency; seller and buyer name, VAT id, country and email; buyer reference, order number, payment means, IBAN; subtotal, tax total, total, amount due; the document type (invoice or credit note) and the sum of the lines. An invoice only gives the values it holds.

The lines table has a row for each line of the invoice: line number, description, quantity, unit, unit price, tax rate and amount. Simpler e-invoices may carry no lines; then you get the fields alone.

The Fields step after Use the invoice's data: 22 fields such as invoice_number, issue_date, due_date, currency, seller_name and seller_vat_id, each tagged From invoice data and found in 1 of 1 samples, a lines table, and the values highlighted in the XML
22 fields and the lines, made from the invoice’s own data. Each field is tagged “From invoice data”, and its value is highlighted in the XML.

These fields are tagged “From invoice data”. No pattern to keep up, no AI to pay for, and the values are exact: dates as yyyy-MM-dd, amounts with a dot. Nothing leaves your system. Tick “Show fields” to see where each value sits in the XML.

Step 3: Check what came in

Exact values can still be wrong for you: a total far bigger than usual, lines that don’t add up, or the same invoice sent twice. In “Checks”:

  • Per field. Under “Check each field”, give the total a range with “Between”, or mark a field “Not blank”. Under “If it fails”, choose “Send to review”.
  • Sums. Under “Check fields together”, tick “The amounts of the lines add up to the subtotal (within 0.01)”. For an e-invoice, the lines are checked against the sum the invoice itself states.
  • Duplicates. Tick “The same”, pick the invoice number and the supplier (for e-invoices, invoice_number + seller_name, or the seller’s VAT id), and choose what happens when it “was parsed before:” “Skip it and note it”, or send it to review. A supplier who sends the same invoice twice isn’t paid twice.
The Checks step: a Between 0.01 and 100000 check on the total that sends it to review, the lines add up and subtotal plus tax checks, a duplicate check on invoice_number + supplier set to Skip it and note it, and the review queue settings, with 3 samples passing
Checks on a supplier-invoice parser: a range for the total, sum checks, and the duplicate-invoice check, tried on the samples first.

Under “Send an email to the review queue when”, leave “Any check above fails” and “A required field is blank” ticked.

Step 4: Review what was held back

An invoice that fails a check waits in Parser › “Needs you”. Nothing is written, sent or moved for it until someone looks. You see the email beside its values; fix one if needed and click “Approve and run the actions (Alt+A)”, or “Skip for now (Alt+S)”, or “Reject: do not process (Alt+R)”.

The Needs you queue of a parser called Supplier invoices: one invoice waiting, shown beside its values, with the buttons Approve and run the actions, Skip for now and Reject
The review queue. This one is a plain text invoice held for a low-confidence read; an e-invoice is held when a check fails or it is a duplicate.

Step 5: Send the data where you need it

In “Output”, choose where the values go. With PRO Parser:

  • “CSV file”, “Excel workbook” or “Google Sheets”: one row per email, with the columns you pick, such as {INVOICE_NUMBER}, {SELLER_NAME}, {ISSUE_DATE} and {TOTAL}. The invoice lines can go to their own sheet, one row per line.

With PRO Rules Server:

  • “SQL database”: a row per invoice in SQL Server, MySQL, PostgreSQL or any ODBC database.
  • “Webhook”: the fields as JSON to your accounting or ERP system.
  • “Tell me”: a message to Slack, Teams and other channels.

Each output has a “Test” button. Processing the same email again replaces its row instead of adding a second one.

Step 6: Save and name the invoice file

Under “Save files”, choose “The attachments” for the PDF or XML, or “The email and its attachments” to keep the email as an .eml file as well. Then build the folder and name from the fields with “Fields…”:

Folder: \\fileserver\Finance\E-invoices\{SELLER_NAME}
File name: {ISSUE_DATE}_{INVOICE_NUMBER}_{FILENAME}{EXT}

Acme’s invoice then lands as \\fileserver\Finance\E-invoices\Acme Beispiel GmbH\2026-10-22_INV-2026-0423_INV-2026-0423.pdf. The PDF is saved as it arrived, with its embedded XML.

The Output step: Save files set to The attachments, with folder and file name boxes and Fields buttons, and a CSV file with columns for invoice number, invoice date, PO number, due date, total and supplier, with a CSV preview
Save files and a CSV file on the Output step. The folder and name take any field the parser reads.
The Parser's Output step for the E-invoices parser: The attachments saved to \\fileserver\Finance\E-invoices\{SELLER_NAME} as {ISSUE_DATE}_{INVOICE_NUMBER}_{FILENAME}{EXT}, the For example path, and a CSV preview of the 22 values
Save each e-invoice in a folder per supplier, named by date and invoice number.

Step 7: Turn it on

In “Run on”, choose the accounts. Tick “Process the emails in the backup now” to handle the e-invoices of the last 30 days straight away, without downloading them again. Leave “Turn on after saving” ticked and save. From then on, the parser runs with each download.

Suppliers who send plain PDFs need a second parser, built with “Highlight” or “Using AI”; see invoice emails to your invoice processing software.

What it doesn’t do

  • It reads e-invoices; it doesn’t create or send them.
  • It doesn’t validate an invoice against the official XRechnung or Peppol rules. It takes the totals as the invoice states them and checks only what you set up in “Checks”.
  • It reads e-invoices that arrive by email (or as files). It isn’t a Peppol access point. If your Peppol provider can pass invoices on by email, the Parser reads them like any other.

Which edition do you need?

  • PRO Parser: everything above with CSV, Excel and Google Sheets output, up to 5 accounts per run. Includes PRO Backup.
  • PRO Rules Server: adds the SQL database, webhook and “Tell me” outputs, and runs as a Windows service with no one signed in.

The Free edition can save e-invoice files but doesn’t read their data. See PRO Parser: e-invoices and pricing.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Contact us with any questions about this post.

Export emails from Gmail and Microsoft 365 to PST, MBOX, EML or PDF

Export Gmail, Microsoft 365, Exchange or IMAP email to PST, MBOX, EML, MSG, PDF or ZIP, and import PST, MBOX and EML files back, step by step.

Need your mail as files? Maybe a PST for Outlook, an MBOX archive, or a PDF of each email for a lawyer or an auditor. Mail Attachment Downloader exports emails from Gmail and Google Workspace, Microsoft 365 and Outlook.com, Exchange, or any IMAP or POP3 mailbox to PST, MBOX, EML, MSG, PDF or ZIP.

It also works the other way: it imports PST, MBOX and EML files. This post shows both, with the names you see in the program.

What you need

  • PRO Backup or any edition above it. Export and Import are on the Backup tab. The Free edition shows that tab as a preview only.
  • Windows 10 or later, 64-bit. No Outlook or other email program is needed, not even to write a PST file: the program connects to the mail server itself.
  • The mailbox added with Add account. Gmail, Google Workspace, Microsoft 365 and Outlook.com sign in with your browser.

Step 1: back up the mailbox

Export doesn’t read the mail server. It writes the files from the account’s backup: an encrypted copy of the emails, kept on your own system. So the mailbox is backed up first. The full walkthrough is in Back up Gmail and Microsoft 365 email. In short:

  1. Open the Backup tab and pick the account with Change account.
  2. On the Configuration page, choose Its own and set Hold everything for to Forever (or as long as you need). An email with no copy in the backup can’t be exported.
  3. On the Run a backup page, click Back up now.

The first backup reads the account’s folders from its start date and copies each email. A big mailbox can take hours. You can stop it at any time, and the next run goes on where it stopped. For older emails, use Backfill emails… on the Downloads tab.

The Run a backup page of the Backup tab for finance@contoso.com, a Microsoft 365 account: 18,431 emails in the backup since 3/3/2019, the last backup an hour ago, the Back up now button, and how a backup works
Back up the mailbox first. Later runs add only the new emails.

Step 2: export the emails

  1. On the Backup tab, open the Export page.
  2. Under Which emails, choose The whole backup, Received between two dates, or Some folders and tick them, for example INBOX/Invoices.
  3. Under As, choose the format (see the next section).
  4. Under To, click Browse… and choose the folder, for example D:\Exports\Finance.
  5. Click Export. A line shows how far it got, and Stop ends it early.
  6. When it’s done, click Open the folder.

The files follow the mailbox’s folders. Each file is named by the date, time, sender and subject, such as 2026-11-11 0902 - Acme Corp - Invoice 4411. Exporting again replaces the files instead of adding copies, so you can repeat an export each month.

If some emails have no copy in the backup, the page lists them, and the export goes on without them.

The Export page for finance@contoso.com: Which emails set to Some folders with INBOX/Invoices ticked, As set to PST: one Outlook data file with the folders, To D:\Exports\Finance, and the result: Exported 2,901 of 2,904 emails, 3 of them with no copy in the backup
Export the Invoices folder of a Microsoft 365 mailbox to one PST file.

Want just a few emails? On the Search page, type a subject, sender or file name and click Search in History. The results open in the Downloads tab. Pick one email, or several with Ctrl or Shift, and choose “Export N emails…”. The Export page then offers “The 12 emails picked in the Downloads tab” (with your number) under Which emails.

Which format to choose

The Backup tab's Export page for finance@contoso.com: Some folders with INBOX/Invoices ticked, and the As list open with EML, MBOX, MSG, PST, PDF and ZIP, PST chosen
The six formats on the Export page, each with what it makes.
  • PST: one Outlook data file with the folders. For Outlook. The whole export is one Unicode PST file, with the mailbox’s folders inside it. In classic Outlook, open it with “File › Open & Export › Open Outlook Data File”.
  • MBOX: one file per folder. For Thunderbird, Apple Mail and archive tools. Thunderbird needs an import add-on, such as ImportExportTools NG, to open MBOX files.
  • EML: one file per email, as the server sent it. The standard email file. Outlook, Thunderbird and most email programs open it, and nothing is changed in it.
  • MSG: one Outlook file per email. Outlook’s own single-email format. Handy when a case file, a ticket or a document management system wants Outlook items.
  • PDF: one per email, its attachments next to it. For reading, printing and legal or audit requests. Each PDF has the email’s header and text, and its attachments are saved beside it as they are.
  • ZIP: the EML files in one zip. One file to hand over, upload or keep.

Save emails as PDF in bulk

To save a whole folder or a date span as PDFs, choose PDF: one per email, its attachments next to it, as in step 2. That’s a one-time export. To turn new emails into PDFs as they arrive, use a rule with a Convert documents step instead (PRO Rules Client). See convert emails to PDF or TIFF.

Import PST, MBOX and EML files

Old mail in a file can go into an account’s backup, where you can search it, export it or restore it.

  1. On the Backup tab, pick the account and open the Import page.
  2. Under Mail files, in What, choose PST: an Outlook data file, with its folders, MBOX: a Thunderbird or Apple Mail file, or a folder of them, or EML: a folder of .eml files (its subfolders are folders).
  3. Under From, click Browse… and choose the file or folder, for example D:\Old mail\archive-2019.pst.
  4. Click Import.

Each email keeps its folder from the file. An email already in the backup (the same Message-ID) is left out, so importing the same file again adds nothing. Imported emails are only kept in the backup: your rules don’t run on them, and nothing is uploaded to the mailbox. Each import shows up as a run under Backup runs.

The Import page for finance@contoso.com: What set to PST: an Outlook data file, with its folders, From D:\Old mail\archive-2019.pst, and the result: Imported 12,840 emails, 1,204 were already in the backup, 2 could not be read; below it, Another computer's backup
Import an old PST file into the account’s backup. Emails already there are skipped.

Convert MBOX to PST (and PST to MBOX)

There is no direct file-to-file converter. Converting is two steps: import, then export.

  1. Import the MBOX file into an account’s backup, as above.
  2. On the Export page, tick the imported folders under Some folders, and choose PST: one Outlook data file with the folders under As.

Note: the file’s Inbox goes into the account’s Inbox, so exporting that folder takes the account’s own Inbox emails too.

The same works from PST to MBOX, EML, MSG or PDF, and from a folder of EML files to PST. The emails stay in the backup afterwards. Want them in a mailbox instead of a file? The Restore page puts a backup’s emails back on the mail server, or, with Another account: in its Into box, into a different kind of account. See Restore.

Extract data: addresses and email details to CSV

Sometimes you don’t need the emails, just a list. The Extract data page writes a CSV file that Excel opens, from the same backup:

  • One row per email: received, from, to, cc, reply-to, subject, folder, attachments and size.
  • One row per email address: the people in these emails, each once: name, domain, first and last email. Tick Leave out this account’s own addresses, and no-reply ones (noreply@, mailer-daemon@…) to keep the list clean.

Click Extract now, or tick After each backup run, add the addresses of the emails it backs up. An address extracted again replaces its own row, so the file never lists it twice. Sending marketing emails to these people may need their consent. The Free edition can try it on up to 25 emails of the last day.

The Extract data page for sales@contoso.com: The whole backup, One row per email address, addresses from From, To, Cc and Reply-To, the columns Name, Seen as, First email and Last email, the CSV path D:\Marketing\sales-contacts.csv, and the result: Wrote 2,316 addresses from 18,431 emails
Extract data: one row per email address, written to a CSV file.

Good to know

  • POP3: POP3 accounts can be backed up and exported, but not restored.
  • Export and Import don’t change the mailbox.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

How to back up Gmail and Microsoft 365 email to your own system

Back up Gmail, Microsoft 365, Exchange or IMAP email to an encrypted, searchable copy on your own system, then restore deleted emails or whole folders.

An email deleted by mistake or a mailbox closed when someone leaves can cost you mail you need. In this post we back up a Gmail, Google Workspace, Microsoft 365, Outlook.com, Exchange or IMAP mailbox to an encrypted copy on your own system, keep it as long as you choose, search it, and put emails back. The tool is the Backup tab of Mail Attachment Downloader.

What PRO Backup is, and what it isn’t

  • An edition of the program: PRO Backup includes everything in the free edition. PRO Parser and the PRO Rules editions include it too.
  • On your own system: the program runs on Windows 10 or later, on a PC, a server or a cloud VM, reads your mailbox directly and stores the backup there, encrypted. There is no Gearmage cloud in between.
  • Email only: emails and their attachments; not calendars, contacts, rules or signatures.
  • Free shows a preview: in the free edition the Backup tab explains what it does, but no copy of an email is kept, and History holds 1 day.

Step by step: back up a mailbox

1. Add the mailbox

Click Add account and type the email address. The provider is picked from it; for an IMAP mailbox elsewhere, the server is usually filled in for you. Click Test Connection: Gmail, Outlook.com and Microsoft 365 sign in through your browser, so no password is stored. Then click Save. For a Microsoft 365 shared mailbox, tick This is a shared mailbox.

The Mail account and server configuration window for ap@contoso.example with the Microsoft 365 tile chosen, sign-in with a Microsoft account in the browser, Microsoft Graph and This is a shared mailbox ticked
Adding a Microsoft 365 mailbox: pick the provider, then Test Connection signs in through your browser.

2. Choose how long the backup keeps emails

Open the Backup tab. Each account has its own backup; Change account at the top switches between them. On the Configuration page:

  • Same as the global Backup settings uses the times and size set in Settings › Storage and clean-up.
  • Its own gives this account its own: Hold everything for a time from 30 days to Forever, and at most a size, or No limit.

An email deleted or moved on the mail server stays in the backup for that long.

The Backup tab's Configuration page for finance@contoso.com, a Microsoft 365 account: Its own, Hold everything for Forever, at most No limit, and a copy of the backup on Office NAS (\\nas\backups)
Configuration: how long this account’s backup holds its emails, and where copies of it go.

The backup reads the account’s folders from its start date. For more folders, or older mail, click Folders and Backfill (Downloads). A backup run is the account’s Connect and Download, so it also saves files as What to save says; choose Nothing: back up only on the Account rule tab to keep the backup only.

3. Run the first backup

Go to Run a backup and click Back up now. The first backup reads the folders and copies each email. A big mailbox can take hours: stop it at any time, and the next run goes on where it stopped.

Every backup after that only fetches what is new. Each email is stored as the mail server sent it, encrypted, and once, even when it is in several folders.

The Run a backup page: 18,431 emails received since 3/3/2019 in the backup (4.2 GB), last backup completed 1 h ago, runs every day at 7:00, the Back up now button and How a backup works
Run a backup: what is in the backup, the last run, the schedule and Back up now.

To keep it up to date on its own, set a schedule in the Schedule tab › App schedule: every 15 minutes, hourly or at a set time. Tick Also download new email as soon as it arrives and IMAP accounts are backed up within seconds, Microsoft 365 accounts about every minute.

4. Copy the backup to a NAS, S3 or Azure Blob

A backup on one computer is lost with that computer. Once a day an encrypted restore point of all accounts can go to another place.

  1. First make a recovery key: Settings › Encryption and restore points › Make a recovery key…. It opens the copies on another computer. It is shown once and Gearmage doesn’t keep it, so save it somewhere safe.
  2. On the Configuration page, click Add a place to back up to… and give it a Name.
  3. In Where it goes, choose A folder on this computer or a network folder (a NAS such as \\nas\backups), a network share with its own sign-in, Amazon S3 or a service like it, or Azure Blob Storage. The last three use a connection you add in Settings › Sources › Cloud Connections.
  4. Tick Also back up the copies of emails to copy the emails themselves, not only the backup’s records (off by default: they can be large).
  5. Keep Daily at or after 02:00, Daily points kept 7 and Weekly points kept 4, or change them, and click Save.
The Add a place to back up to window: name Office NAS, a folder on this computer or a network folder, \\nas\backups, Also back up the copies of emails ticked, daily at or after 02:00, 7 daily and 4 weekly points kept
A place to back up to: a network folder on the office NAS, with a restore point every day.

5. Search the backup

On the Search page, type a subject, sender or file name and click Search in History, or click Show all of this account’s emails. It searches the backup itself, without connecting to the mail server, so it also finds emails deleted from the server. The results are in the Downloads tab. Pick one email, or several with Ctrl or Shift, and choose Restore… or Export… for just those.

6. Restore deleted emails or whole folders

Open the Restore page.

  1. Under Which emails, choose The whole backup, Received between two dates, or Some folders, for example INBOX/Invoices.
  2. Under Into, keep this account, or choose Another account: to put them into a different mailbox, such as ap@contoso.com.
  3. Click Restore… and confirm.

Each email goes back into the folder it came from, and a folder deleted since is made again. An email that is still there is left alone, so restoring twice adds nothing. Emails come back as read, with the date they were received. A large restore can be stopped and continued later with Go on with the restore.

The Restore page for finance@contoso.com: Some folders with INBOX/Invoices ticked, Into this account, the Restore button, and the result: 2,412 emails restored, 489 still there, the folder Inbox/Invoices made again
Restore: put a folder back into the mailbox it came from, or into another account.

Good to know before you restore:

  • Restore works with IMAP (Gmail too), Microsoft 365 and Exchange accounts. POP3 can’t take mail back: export those emails instead.
  • Microsoft 365 takes each email as a message made from it, with the same sender, recipients, date, text and attachments. The backup keeps the original.
  • Gmail takes about 500 MB of uploads a day, so a big restore stops there and goes on the next day.

7. Import old PST, MBOX or EML files

On the Import page, under Mail files, choose What: a PST file, an MBOX file or folder, or a folder of .eml files. Pick it in From with Browse… and click Import.

Each email keeps its folder, and emails already in the backup are left out. Your rules don’t run on imported emails unless you choose Process again in the Downloads tab.

The Import page: PST, an Outlook data file with its folders, from D:\Old mail\archive-2019.pst, 12,840 emails imported and 1,204 already in the backup, and Add from another computer's backup
Import: bring an old PST into the account’s backup. Duplicates are left out.

Lost the computer? On a new one, set up the same account and click Add from another computer’s backup… with the old computer’s recovery key.

Export, or move mail to another kind of account

The Export page saves emails from the backup as files other programs open: EML, MBOX, MSG, PST for Outlook, PDF or ZIP. See Export emails to PST, MBOX, EML or PDF.

To change providers, choose a different kind of account under Into on the Restore page, such as Gmail into Microsoft 365, or Yahoo into an IMAP mailbox. Read and unread, flags and Gmail’s labels (as Outlook categories) can come along. It is a copy: nothing is deleted from the old account. See Move mail to another kind of account.

More good to know

  • More than 3 accounts: PRO Backup runs up to 3 accounts in one run; the others are kept and run on their own. PRO Parser runs up to 5, the PRO Rules editions any number.
  • Around the clock: backups run while the program runs. To run as a Windows service, even when nobody is signed in, you need PRO Rules Server.
  • Nothing downloaded twice: each account’s History remembers the emails it has seen.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Questions about this post? Contact us.

Streamline your inbox: how to merge varying email attachments into a single PDF

Turn an email and its Word, Excel and picture attachments into one clean PDF automatically, without logos and signature images.

How many times have you opened an email, saved three attachments (a Word document, an Excel sheet and a JPEG picture), converted each one and then pieced them together into one file for a report or an archive?

With many emails a day, that is a lot of clicking. Mail Attachment Downloader can do it for you. With PRO Rules Server it turns an email and its attachments, whatever their format, into one merged PDF.

Here is how to set it up in version 4.0, and how to keep logos and signature pictures out of the result.

Why merge emails and attachments?

  • Simpler archives: the email’s text and its files are kept together in one document.
  • Audit and compliance: legal, finance and other teams get a complete record of each email in one file.
  • Easy sharing: send clients or colleagues one document instead of a pile of attachments.

Step 1: Save the email’s text too

For the merged PDF to start with the email itself, the rule must save the email as well as its attachments.

  1. Open the PRO Rules tab. Click New rule…, or select a rule and click Edit. The Rule Editor opens.
  2. Under Which emails, set the conditions, for example From ‘northwind.example’.
  3. Under Save, set What to save to The email and its attachments, and choose the Save folder, for example \\fileserver\Finance\Northwind.

Step 2: Leave out the junk

You don’t want social media icons or a company logo from an email signature in your clean PDF. Two settings under Save take care of that:

  • Leave out the pictures inside the text: the pictures shown inside the email’s text, such as logos and signature images, are not saved. Files attached to the email are still saved.
  • Only files of these types: tick Documents (.doc, .pdf…), and add more types in Other:, such as .xlsx, .csv. Leave Pictures (.jpg, .png, .gif…) unticked if you only want documents. If the types would hold back the email’s own .eml file, the Rule Editor says so and offers Let the email through.

Step 3: Convert everything and merge it

Version 4.0 does the converting and the merging with one choice:

  1. Click Add a step…, choose Files, then Convert all files to a single PDF, and click Add.
  2. Under What happens to the original files?, choose Delete them to keep only the merged PDF, or Keep them to keep the originals and the separate PDFs as well.
  3. Set the File name of the merged PDF, for example {SAVE_PATH}\{DATE[yyyy-MM-dd]}_{SUBJECT}_{ID}.pdf. {SAVE_PATH}\ puts it in the folder the files were saved in, and {ID} keeps each email’s PDF apart.
  4. Click Add steps, then Save.

This adds two steps under Then: Convert documents, which makes a PDF of each saved file and of the email, then Merge PDFs, which joins them. Delete them ticks Delete the originals after converting them and Delete the PDF files merged for you.

The Add a step window on the Files group: Convert documents, Merge PDFs, Convert all files to a single PDF, Split PDF, Make PDFs searchable (OCR) and more
Add a step › Files › Convert all files to a single PDF.
The Convert all files to a single PDF window: the two steps it adds, What happens to the original files? with Keep them and Delete them, the merged PDF's name {SAVE_PATH}\{DATE[yyyy-MM-dd]}_{SUBJECT}_{ID}.pdf and Put the email's text last
Convert all files to a single PDF: one window sets up both steps.

Step 4: Fine-tune the merge (optional)

Select the Merge PDFs step to change it:

  • Merge: choose All the email’s PDF files (across rules), The PDF files this rule saved so far, or Each PDF file with the email converted to PDF (one PDF per attachment, each with the email in front).
  • Put the email’s text last moves the email to the end.
  • File name: click Fields… to build the name from the sender, the date, the subject or any field.

In the Convert documents step, tick Ignore failures (when several types are converted) so that one file that can’t be converted doesn’t stop the rest.

The Merge PDFs step in the Rule Editor: Merge set to All the email's PDF files, a file name in the save folder with the date, subject and ID, and Delete the PDF files merged
The Merge PDFs step: what is merged and what the merged file is called.

The result

Once the rule runs, the program does the rest. When an email matches, it leaves out the junk, converts the files, and builds the document. Run it on a schedule, as new email arrives, or as a Windows service with nobody signed in.

Your folder gets one PDF for each email. The first pages show the email, and the attachments follow, rendered as PDF pages.

Before you turn it on, click Test this rule… on the PRO Rules tab to try it on a few emails. Nothing is changed.

Merge several emails into one PDF

Leave {ID} out and give the merged PDF a name that several emails share, and their pages go into the same file, one email after the other. For example, {SAVE_PATH}\{PROCESSED_DATE_LOCAL[yyyy-MM-dd]}_Northwind.pdf gives one PDF for the day’s Northwind emails.

This works within one download. A merged PDF left by an earlier download is replaced, not added to, so the same emails always give the same PDF. If the rule runs more than once a day, put the hour in the name too, such as [yyyy-MM-dd_HH], and choose Keep them so the separate files stay as well.

Going beyond PDF

  • Password: tick Encrypt the PDF in a conversion to protect sensitive files.
  • Other formats: PRO Rules Server converts to more than 50 formats, including multi-page TIFF, HTML and JPEG. See Convert emails to PDF or TIFF.
  • Scans: Make PDFs searchable (OCR) and Split PDF handle scanned batches.
  • Old mail: with PRO Backup, the Backup tab exports kept emails to PDF without a rule. See Export.

Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.

Related

Using version 3.x? See the 3.x version of this guide.

Contact us with any questions or suggestions about this post.