Download attachments from a shared mailbox in Microsoft 365 automatically

Download attachments from a shared mailbox in Microsoft 365 or Exchange automatically, to a network folder or SharePoint. No Outlook, no extra password.

To download attachments from a shared mailbox automatically, add the shared mailbox’s address in Mail Attachment Downloader, pick Microsoft 365, tick This is a shared mailbox and sign in as yourself, with a work account that has access to it. From then on the attachments are saved to a folder, a network share or SharePoint on your schedule, without Outlook.

The examples use Contoso’s shared mailboxes invoices@contoso.com and ap@contoso.com, the user you@contoso.com and the share \\fileserver\Finance.

What you need

  • The edition: shared mailboxes need a PRO edition, from PRO Backup up. Rules that send each kind of attachment to its own folder, and uploads to SharePoint, need PRO Rules Client or PRO Rules Server.
  • Access to the mailbox: your work account needs Full Access to the shared mailbox, which your Microsoft 365 administrator gives in the Exchange admin center. If you can open it in Outlook, you have it.
  • Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM. No Outlook needed.

How to save shared mailbox attachments automatically

1. Add the shared mailbox as an account

Click Add account and type the shared mailbox’s address, such as invoices@contoso.com, in Email address. The program picks the Microsoft 365 tile from the address, and the Server tab says it Connects with Microsoft Graph, the way Microsoft recommends.

2. Tick “This is a shared mailbox”

On the Server tab, tick This is a shared mailbox. The sign-in then asks Microsoft for access to shared mailboxes too, and lets you sign in as a different user than the mailbox’s address.

Download attachments from a shared mailbox: the Mail account and server configuration window of Mail Attachment Downloader with the Microsoft 365 tile, sign-in in the browser, Connects with Microsoft Graph, and This is a shared mailbox ticked
The Microsoft 365 tile with This is a shared mailbox ticked.

3. Sign in with your own account in the browser

Click Test Connection. Microsoft’s sign-in page opens in your browser. Sign in as yourself (you@contoso.com), not as the shared mailbox: a shared mailbox has no password of its own. Allow access, come back and click Continue, then Save. No password is stored; the program keeps a sign-in token, encrypted on your system.

Signed in to the browser with another account? Tick Private window. What the app asks for lists each permission in plain words.

Microsoft 365 sign-in for a shared mailbox in Mail Attachment Downloader: the Sign in to Microsoft 365 window waiting for the browser, with Use my default browser, Private window, the permissions it asks for (read and manage mail, send email, stay signed in) and Copy for IT
The sign-in happens on Microsoft’s own page; this window says what the app asks for.

4. Choose what to save and where

Next to Save location, type a network folder such as \\fileserver\Finance\Invoices, or click Browse…. Use the UNC path, not a mapped drive letter. The folder pane searches the Inbox; Choose other folders… adds others. The Account rule tab’s pages decide which emails and files to keep, such as only PDFs. Click Connect and Download, then set a schedule on the Schedule tab.

Each account has its own History, so the next run takes only new emails, and nothing is saved twice. See save Outlook attachments to a network folder for folders, file names and the service.

What permissions must IT grant?

Two things, and many organizations need both:

  • Full Access to the shared mailbox: for the user who signs in, given in the Exchange admin center.
  • Approval of the app: where users may not let apps in themselves. With This is a shared mailbox ticked, the app asks Microsoft Graph for Mail.ReadWrite and Mail.Send, Mail.ReadWrite.Shared (“Read and manage mail in shared mailboxes”), Mail.Send.Shared (“Send email from shared mailboxes”) and offline_access, so downloads keep running without signing in again. Sending is asked for so rules and email notifications can send from the mailbox.

Blocked by your organization? Copy for IT in the sign-in window copies the list to send your administrator. After a test, the account window’s Permissions tab shows what was Requested and what was Granted.

The Microsoft 365 account window for the shared mailbox invoices@contoso.com on the Permissions tab after Test Connection: Granted lists the Microsoft Graph permissions Mail.ReadWrite, Mail.ReadWrite.Shared, Mail.Send, Mail.Send.Shared and offline_access, and Connected to Microsoft 365
The Permissions tab shows what Microsoft granted, including the two permissions shared mailboxes need.

Use your organization’s own app registration

For a server that runs unattended, IT may prefer an app of its own to a user’s sign-in. In the account window, pick App registration as the sign-in and fill in the App registration tab: Client ID, Client secret and Tenant ID. With all three, the program signs in as your organization’s own app, with no sign-in page and no user account.

What IT sets up in Microsoft Entra ID:

  1. Register an app and make a client secret.
  2. Add the Microsoft Graph application permission Mail.ReadWrite (and Mail.Send if rules send email), and grant admin consent.
  3. Limit the app to the mailboxes it needs with RBAC for Applications in Exchange Online. Without it, the app can read every mailbox in the organization.

Configuration help on the tab opens the guide. App registrations are in the PRO editions.

Microsoft 365 shared mailbox with an app registration in Mail Attachment Downloader: the App registration tab with Client ID, a kept Client secret and Tenant ID, the hint Signs in as your organization's own app, with no sign-in page, and Configuration help
Your organization’s own app: client ID, secret and tenant ID, and no sign-in page.

Several shared mailboxes in one run

Add each shared mailbox as its own account, the same way. Then pick <multiple@multiple> in the Account box, click Choose accounts…, tick the mailboxes and click Validate and use selected. They are downloaded one after the other, each with its own settings. PRO Backup runs up to 3 accounts together, PRO Parser up to 5, and the PRO Rules editions any number.

Save attachments from several shared mailboxes in one run: the Select accounts window of Mail Attachment Downloader with two of three mailboxes ticked and Validate and use selected
Tick the mailboxes to download in one run.

With PRO Rules, one rule can serve every mailbox and file each one apart: a save folder such as \\fileserver\Finance\{ACCOUNT_EMAIL} gives each shared mailbox its own folder, and an Account condition makes a rule for one mailbox only.

Microsoft 365 shared mailbox attachments to SharePoint

A shared mailbox often belongs to a team whose files live in SharePoint. Add the Upload to cloud step to the rule, pick a SharePoint connection and a library folder, and each saved attachment goes there too, in subfolders named from the email if you like. See save email attachments to SharePoint, OneDrive or S3.

Around the clock, as a Windows service

With PRO Rules Server, the Windows service downloads the shared mailboxes 24×7, even when nobody is signed in: Schedule › Service schedule › Install service. The service runs as Local System, which can’t open most network shares, so run it as an account that may write to the share, or upload to a share with its own sign-in.

The New Network share connection window of Mail Attachment Downloader: why a share needs its own sign-in when the service runs as Local System, the Share box, a user name and password, and the connection name
A network share with its own sign-in, for the Windows service.

Exchange on your own server

For Exchange on your own network, pick the Exchange tile (Exchange Web Services). Shared mailboxes you have Full Access to show in the folder list next to your own Inbox, and Add all Inboxes under the folder pane’s Options… ticks the Inbox of each. For Microsoft 365, use the Microsoft 365 tile: Microsoft is switching EWS off for Exchange Online.

Questions people ask

Do I need the shared mailbox’s password?

No. A shared mailbox has no sign-in of its own. You sign in as a user with access, or IT uses an app registration.

Does it need Outlook?

No. It talks to Microsoft 365 directly through Microsoft Graph. Outlook doesn’t have to be installed or open.

Can it save the emails too, not just the attachments?

Yes. On the Account rule tab, What to save can be the email and its attachments, or the email only. To keep a searchable copy of the whole mailbox, see back up Microsoft 365 email.

Why does the sign-in say my administrator must approve the app?

Your organization lets only approved apps read mail. Click Copy for IT and send the list to your administrator.

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.

Migrate Gmail to Microsoft 365, or any mailbox to another provider

Migrate Gmail to Microsoft 365, Outlook.com, Exchange or IMAP with folders, read state and labels: back up the old mailbox, then move it into the new one.

To migrate Gmail to Microsoft 365, back up the Gmail mailbox and then restore that backup into the Microsoft 365 account. Mail Attachment Downloader does both on your own system: the folders are made in the new mailbox, and read and unread, stars and Gmail’s labels (as Outlook categories) can come along. It works the other way too, and between Google Workspace, Microsoft 365, Outlook.com, Exchange and any IMAP mailbox.

What you need to move email from Gmail to Outlook or Microsoft 365

  • The edition: moving mail is part of PRO Backup and every edition above it. The free edition shows the Backup tab as a preview only.
  • Both accounts set up in the program: the old one, whose backup you move, and the new one, which takes the emails.
  • A new mailbox that takes mail back: IMAP (Gmail and Google Workspace too), Microsoft 365, Outlook.com or Exchange. A POP3 account can’t take mail in.
  • Windows 10 or later: on a PC, a server or a cloud VM. The emails go from the old mail server to your system and on to the new one, with no Gearmage cloud in between.

It moves email and its attachments. Calendars, contacts, rules and signatures aren’t included.

Step by step: transfer a mailbox to another provider

1. Add the old and the new account

Click Add account and type the email address. The provider is picked from it. Click Test Connection: Gmail, Google Workspace, Outlook.com and Microsoft 365 sign in through your browser, so no password is stored. Then click Save. Do this for both mailboxes.

The Mail account and server configuration window of Mail Attachment Downloader for ap@contoso.example: provider tiles Gmail and Workspace, Outlook.com, Microsoft 365, Yahoo, AOL, Exchange and Other, Microsoft 365 picked from the address, sign-in with a Microsoft account in the browser, Microsoft Graph, This is a shared mailbox ticked
Adding the new Microsoft 365 mailbox: the provider is picked from the address, and Test Connection signs in through your browser.

2. Keep the whole old mailbox in the backup

Open the Backup tab and use Change account to pick the old account. On the Configuration page, choose Its own and Hold everything for Forever, so no email ages out of the backup before it is moved.

The Backup tab's Configuration page in Mail Attachment Downloader 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: Its own, Forever keeps each email of the old account until you have moved it.

A backup reads the account’s folders from its start date. To move all of it, click Folders and Backfill (Downloads): on the Downloads tab, Choose other folders… ticks the folders, and Backfill emails… brings in the older mail. What the backup covers then says “Full backup: every folder, all mail, backup copies held for ever.”

A backup run is the account’s Connect and Download. So it doesn’t also save attachments to a folder, choose Nothing: back up only under What to save on the Account rule tab.

3. Back up the old mailbox

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

The Run a backup page of Mail Attachment Downloader: 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 Folders and Backfill (Downloads)
Run a backup: how many emails the backup holds, and Back up now.

Still using the old account while you switch? Run Back up now again just before the move, so the latest emails come along.

4. Move the backup into the new account

Open the Restore page.

  1. Under Which emails, choose The whole backup, or Some folders.
  2. Under Into, choose Another account: and pick the new mailbox. Only accounts that can take emails back are listed.
  3. Check the Folders list: each folder of the backup goes into the folder on its right, made when missing. Inbox, Sent, Drafts, Trash, Junk and Archive are matched by what each mail server says they are. Change any of them, or choose Leave out.
  4. To keep the old mail apart, use Put everything under one folder: with a name such as Old Gmail. Choose Keep the folder structure under it, or put all the emails straight into that one folder.
  5. Under Keep, tick what comes along: read and unread and flags (stars), and Gmail’s labels or Outlook categories.
  6. Click Restore… and confirm.
The Restore page of Mail Attachment Downloader for the backup of finance@contoso.com: Some folders with INBOX/Invoices ticked, Into this account or Another account: ap@contoso.com, the Restore button, and the result: 2,412 emails restored, 489 still there, the folder Inbox/Invoices made again, 3 too large or damaged to restore
The Restore page: pick the folders, then Another account under Into to move them to a different mailbox.
Mail Attachment Downloader's Restore page for the Google Workspace backup of finance@contoso.com going into another account, finance@contoso.onmicrosoft.com on Microsoft 365: INBOX into Inbox, Sent Mail into Sent Items, Invoices made new, Spam left out, keeping read state, flags and Gmail's labels as Outlook categories
Moving a Gmail mailbox to Microsoft 365: each folder goes into the folder on its right, and labels become categories.

Nothing is deleted from the old account: a move is a copy. Emails already in the new mailbox are left alone, so none goes in twice. While the move runs, the new account doesn’t download.

5. Go on with a large move

Gmail takes about 500 MB of uploads a day, so a big move into Gmail or Google Workspace stops there and goes on the next day. If you stop a move, or the mail server refuses more emails, click Go on with the restore later. It starts after the last email put back in each folder.

When it ends, the page says how many emails went in, which folders were made, and which emails couldn’t go in and why, such as an email larger than the new mailbox takes.

Gmail labels vs Outlook folders: what comes along

  • Folders: made in the new mailbox when missing, with the names in the list.
  • Labels: in Gmail one email can have several labels, and each label shows up as a folder. The email goes into the new mailbox once, into the first of its folders in the list. Tick Gmail’s labels, as Outlook categories and its labels come along as categories. From Microsoft 365 into Gmail, Categories, as Gmail labels does the reverse.
  • Archived Gmail: emails only in All Mail, with no other label, come along too.
  • Stars: Gmail’s Starred and Important are not folders of their own: a star becomes a flag.
  • Read and unread: asked of the old account as the move starts, so keep it open until the move ends. If it can’t be asked, emails come in as read.
  • Dates: each email keeps the date it was received. Microsoft 365 takes each one as a message made from it, with the same sender, recipients, date, text and attachments; the backup keeps the original.

Other moves: Microsoft 365 to Gmail, IMAP to Microsoft 365

The steps are the same for any pair: Microsoft 365 to Google Workspace, Yahoo or a web host’s IMAP mailbox into Microsoft 365, or an on-premises Exchange server into Microsoft 365. Exchange connects through EWS, Microsoft 365 and Outlook.com through Microsoft Graph. See Move mail to another kind of account and Microsoft 365 and Exchange.

Old mail in files? Import brings a PST, MBOX or folder of .eml files into an account’s backup, and from there it moves like the rest. To keep a copy outside any mailbox, Export saves the backup as PST, MBOX, EML, MSG, PDF or ZIP: see Export emails to PST, MBOX, EML or PDF.

Questions people ask

Does migrating delete my emails from Gmail?

No. The move is a copy: nothing is deleted from the old account, and the backup keeps its copy too.

Are contacts and calendars moved?

No. Email and attachments only. Calendars, contacts, rules and signatures aren’t included.

How long does it take to move a mailbox to Microsoft 365?

The first backup of a big mailbox can take hours. Into Gmail, a move goes at about 500 MB a day. Both can be stopped and go on later.

Can I move just one folder?

Yes. Choose Some folders under Which emails and tick the folders, or choose emails Received between two dates.

Can I move Microsoft 365 email to Gmail?

Yes. Back up the Microsoft 365 account and move it into the Gmail account; categories can come along as Gmail labels.

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

Planning a move for a whole team? Contact us.

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.

Support for modern authentication in Outlook, Microsoft 365, Exchange and Google

How Mail Attachment Downloader signs in to Microsoft 365, Outlook.com, Exchange and Gmail with modern authentication, and what IT needs to know.

Mail Attachment Downloader signs in to Microsoft 365, Outlook.com, Exchange Online and Gmail with modern authentication (OAuth 2.0). You sign in on Microsoft’s or Google’s own page in your browser, and the program never sees your password. It keeps only the sign-in (a token), encrypted for your Windows account.

This post covers version 4.0. Everything here is in the Free edition too, except where it says PRO.

New in 4.0

  • A tile for each big provider: Gmail, Outlook.com, Microsoft 365, Yahoo, AOL, Exchange and Other. Type your address and the right one is picked, also on your own domain: the program looks up its mail records.
  • The Microsoft 365 tile connects with Microsoft Graph, the way Microsoft recommends.
  • Sign in in a Private window, so an account your browser is already signed in to isn’t used by mistake. The Permissions tab shows what was Requested and Granted.
  • Setup guides for 150+ providers that need an app password, and a plain explanation when a provider turns a password down.

Which settings should I pick?

Your emailTileConnects withHow you sign in
Microsoft 365 (work or school)Microsoft 365Microsoft GraphMicrosoft, in your browser, or App registration (PRO)
Outlook.com, Hotmail, LiveOutlook.comIMAPMicrosoft, in your browser
Gmail, Google WorkspaceGmailIMAPGoogle, in your browser, an app password, or App registration (PRO)
Exchange on your own serverExchange, with On-premises only tickedExchange Web Services (EWS)Your password, or Windows sign-in
Yahoo, AOL, iCloud and othersYahoo, AOL, or OtherIMAPAn app password, with the setup guide

A Microsoft 365 account can also use Use IMAP instead or Use Exchange Web Services instead on the Server tab, still signing in with Microsoft. Prefer Microsoft Graph: Microsoft is switching EWS off in Exchange Online (from October 2026, and removing it in April 2027, by Microsoft’s schedule). If an older Microsoft 365 account still uses EWS, pick the Microsoft 365 tile and sign in again.

The Mail account and server configuration window with the Microsoft 365 tile picked from the email address, a browser sign-in, and the Server, Sending mail, App registration and Permissions tabs
The account’s settings: the tile is picked from your address, and Microsoft 365 connects with Microsoft Graph.

Signing in with your browser

  1. Click Add account and type your address in Email address. Check the tile against the table. With a browser sign-in, there is no password box.
  2. Click Test Connection. A sign-in window opens, then your browser. Pick Private window if your browser is signed in to another account.
  3. Sign in as the same account and allow every permission. On Google, tick every checkbox: unticked boxes aren’t granted.
  4. Go back to the program. It continues by itself and shows Connection works. Click Save.

If the browser didn’t open, click Browser didn’t open?. Keep Remember ticked so scheduled downloads can sign in by themselves. For a Microsoft 365 shared mailbox, tick This is a shared mailbox on the Server tab (PRO).

The Sign in to Microsoft 365 window for finance@contoso.com: steps Sign in with Microsoft, Allow access, Continue; Use my default browser, Private window, waiting for the browser, Browser didn't open?, the permissions the app asks for and Copy for IT
Signing in to Microsoft 365: the program waits while you sign in in your browser, and lists what it asks Microsoft for.

Yahoo, iCloud and others: app passwords

Yahoo, AOL, iCloud and many other providers don’t offer OAuth to other programs. They need an app password: a separate password for one program, which you can cancel without changing your main one. Gmail accepts one too if 2-Step Verification is on, but the browser sign-in is easier.

Type your address, then click Set up <provider>… in the note under Sign in. The guide opens the provider’s page to create the password, checks what you paste, and tests it. Click Use this password, then Save the account. See what each provider needs.

The Set up AT&T Mail guide: open the provider's help, paste the secure mail key, test the connection, and Use this password
A setup guide: open the provider’s page, paste the password, test it, then “Use this password”.

Typed your regular password instead? The program explains what the provider wants: click Open setup guide.

Yahoo Mail turned down the sign-in: Yahoo only accepts an app password, with How to fix it and an Open setup guide button
When a provider turns down a password, the program says what it needs.

For IT administrators

By default the program signs in to Gmail, Outlook.com and Microsoft 365 through our own app, and each user grants it access. Most organizations only need to grant admin consent once. The sign-in window’s Copy for IT button copies the account, the client ID and the permissions requested, never passwords, tokens or secrets.

Built-in Microsoft app: Mail Attachment Downloader, client ID 327a7151-62e7-4ab6-af0a-55120ca90505, a multi-tenant desktop app with delegated permissions only and no client secret.

PermissionUsed for
Mail.ReadWrite, Mail.SendMicrosoft Graph: reading, moving and marking email, and rules that send email
Mail.ReadWrite.Shared, Mail.Send.SharedShared mailboxes only (PRO)
IMAP.AccessAsUser.All, SMTP.SendMicrosoft 365 and Outlook.com over IMAP
EWS.AccessAsUser.AllExchange (EWS) only
https://mail.google.com/Gmail over IMAP. Google has no narrower IMAP permission.
offline_accessStaying signed in for scheduled downloads

Your own app registration (PRO): pick App registration under Sign in and fill in the App registration tab. For Microsoft 365 (Graph, EWS or IMAP), a Client ID, Client secret and Tenant ID give app-only access, which password resets and sign-in policies don’t stop. For Gmail and Google Workspace, enter your own Google Cloud OAuth client; users still sign in once, through your app. It isn’t available for POP3, Exchange on your own server or personal Microsoft accounts. Guides: Microsoft Entra and Google Workspace. Read the security notes on app-only access first.

A Microsoft 365 account's window with App registration chosen: Client ID, a kept client secret and Tenant ID, made-up values
Your own app registration: Client ID, Client secret and Tenant ID.

The Windows service (PRO Rules Server): browser sign-ins go with the service when it is installed. If one is revoked later, sign in again in the program, then click Reinstall… on Schedule › Service schedule. For Microsoft 365, app-only access avoids this.

Connection or sign-in problems?

Read the message above Test Connection: it gives the mail server’s own words. Then open Troubleshoot › Connection diagnostics, which shows each stage of the latest sign-ins with timings and the error.

What you seeWhat to do
“Some permissions weren’t granted”Sign in again and allow every permission. See granting the permissions.
Microsoft asks for admin approval, or 403 ForbiddenSend your IT team the Copy for IT text and this post.
Signed in as the wrong accountSign in again in a Private window.
A Gmail or Microsoft account keeps failingTroubleshoot › Clear saved sign-in, then Test Connection.
A Microsoft 365 account on EWS stopped connectingPick the Microsoft 365 tile and sign in again.

Still stuck? Tick Verbose logging in Settings › Logs and support, try again, and click Submit a bug report…. Reports leave out passwords and tokens.

Free and PRO

Browser sign-in, the setup guides and Connection diagnostics are in the Free edition. The PRO editions add shared mailboxes, your own app registration, sending mail from your accounts (for rules and email notifications), and, from PRO Rules Client, uploads to OneDrive and SharePoint, which sign in on their own in Cloud connections.

Related

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

Feedback on sign-in? Contact us.

Download from multiple email accounts with multiple rules

Download from several email accounts in one run and give each kind of email its own folder, file name and steps with PRO Rules.

The Free edition of Mail Attachment Downloader downloads from one email account per run. Each account has one rule: the Account rule tab says which emails it downloads, which files it keeps and where it saves them.

This post shows how the PRO editions go further: several accounts in one run, and many rules, each with its own folder, file names and follow-up steps. It is written for version 4.0.

The Account rule tab of the Free edition, on its Filters page, for the account ap@contoso.example
Free edition: one Account rule per account, with its Search, Filters and Folders and file names pages.

Multiple email accounts

In the Free edition you pick an account in the Account box and click Connect and Download. To download from another account, you pick it and run again.

In the PRO editions one run can take several accounts:

  1. Add each account on its own first, with Add account › Email account…, and check it with Test Connection.
  2. Pick <multiple@multiple> in the Account box. The Settings… button next to it changes to Choose accounts….
  3. Click Choose accounts…, tick the accounts, for example finance@contoso.com and ap@contoso.com, and click Validate and use selected. Each account is checked: it must sign in, and its save folders must be writable. Every problem is listed at once.
  4. Click Connect and Download. The accounts run one after another. If one fails, for example because its sign-in expired, the others still run.
The Select accounts window with two accounts ticked and the Validate and use selected button
Tick the accounts, then click “Validate and use selected”.

How many accounts run together depends on the edition: PRO Backup up to 3, PRO Parser up to 5, and PRO Rules Client and PRO Rules Server as many as you have. See the plans and prices.

<multiple@multiple> has no settings of its own. Each account downloads with its own settings. To change them, pick that account in the Account box.

After the run, the Downloads tab shows what each account did: the emails, the files, any errors, and which rule saved each file. Each run names its account. An account that can’t run until you fix something is listed under Action required.

New in 4.0: each account has a History. It remembers the emails it has seen, so nothing is downloaded twice, and a step that failed is tried again on its own.

Several accounts in the background

With PRO Rules Server the program can run as a Windows service, on a PC, a server or a cloud VM, even when nobody is signed in. Open Schedule › Service schedule, pick <multiple@multiple> in Install the service for, click Select accounts…, tick the accounts and click Validate and use selected. Then click Install service.

The Service schedule page of the Schedule tab, with the Install the service for box and the Install service button
Schedule › Service schedule: choose the accounts, then install the service.

The service keeps the copy of your settings it got when it was installed. When you change a setting or a rule later, the page shows Reinstall to apply changes: click Reinstall…. See the PRO Rules Server how-to.

Multiple email rules

The Account rule gives each account one set of choices. For example, on the Search page you set a start date, and on the Filters page you keep only emails whose subject has “invoice”. All of that account’s matching files go to one folder, named one way.

But what if invoices from Acme should go to one folder, purchase orders from Northwind to another, and Word files should also be turned into PDFs?

That is what PRO Rules are for (PRO Rules Client and PRO Rules Server). In version 3.x this tab was called Global filters. Each rule has its own conditions, its own save folder and file names, and its own steps that run after saving.

The PRO Rules tab with Use PRO Rules for every account ticked and a list of rules in the order they run
The PRO Rules tab: the rules, in the order they run.

How PRO Rules work

  • Turn them on: tick Use PRO Rules for every account at the top of the PRO Rules tab. The rules then decide what each account downloads, instead of each account’s Search, Filters and Folders and file names pages.
  • Dates: on the Search scope page of the PRO Rules tab, Only emails from and Only emails up to apply to every account, and override each account’s own dates. On the same page, choose whether Each account decides what it searches (new mail or all mail) or it is The same for all accounts.
  • Every account, or one: a new rule is for all accounts. To make a rule for one account only, add an Account condition to it (more below).
  • Order matters: rules run from the top of the list. Each file is saved by the first rule that matches it, so the rules below it never see that file. The next file of the same email starts again from the top. Drag a rule up or down to change the order.
  • Moving from Account rules: when you turn PRO Rules on, the program offers to move your Account rules to PRO Rules too. Each account’s Search, Filters and folder settings become a rule of its own, and you see each rule first.

Make your first rule

Click New rule… in the PRO Rules tab. The Rule Editor opens. Give the rule a name in Rule name:, for example “Acme invoices 2026 Q1”. The rule has these parts, top to bottom: Which emails, Fields to find, Save, Then and If something fails.

Which emails: the conditions

Click Add a condition and pick what to match: From, Subject, Attachment name, Mailbox folder, Received on or after, Account and more. Put several conditions in an Any of these or All of these group to combine them with OR or AND.

To match on the subject, add a Subject condition and type what to look for:

  • Text in quotes: 'invoice' matches any subject that has “invoice” anywhere in it.
  • AND, OR and NOT: ('invoice' OR 'bill') AND NOT 'reminder'. Use parentheses to group them.
  • A whole value: = before a value matches only that exact text.
  • A regular expression: !! before a .NET regular expression.

Click Test the expression… to try it on a sample text before you save. Conditions match the text exactly as you type it: they don’t fill in fields such as {DATE}.

The Test an expression window: the expression 'invoice' OR 'bill' tried on a sample sentence, with the result It matches
“Test the expression…” shows whether a condition matches.

One account only: add an Account condition and choose the account, for example finance@contoso.com. Without it, the rule runs for every account.

The Rule Editor with conditions for a mailbox folder, received dates, an account, and an Any of these group with From and Subject
Conditions of a rule, with an Account condition and an “Any of these” group.

Save: what, where and how it’s named

Click Save in the rule’s outline:

  • What to save: The attachments, The email and its attachments, or The email only (as an .eml file). Emails without attachments are saved too when the email is part of what you save.
  • Save folder: for example \\fileserver\Finance\Invoices. For a network folder, use a \\server\share path, not a mapped drive letter: the Windows service can’t see mapped drives.
  • File name: build it from fields. Click Fields… to pick them. For example {DATE_LOCAL[yyyy-MM-dd]}_{FILENAME}_{ID}{EXT}.
  • Only files of these types: keep only documents, pictures or the types you list, such as .pdf, .xlsx.

A field in the save folder makes a folder for each value. For example, \\fileserver\Finance\Invoices\{EMAIL_FROM} makes a folder for each sender’s address. Missing folders are made for you.

Keep {ID} in the file name. It is the message’s ID with the part number, so each file’s name is different, even when two emails send a file called invoice.pdf.

The Save part of a rule: What to save, Save folder, File name with fields, and Only files of these types
The Save part: what is saved, where, and how the files are named.

Fields to find: values from the email

A rule can also read values, such as an invoice number, and use them in folder names, file names and steps. For values you read from many similar emails, the Parser (PRO Parser and up) is the better way: highlight the value in a sample, or describe it in plain words. A parser is saved as a PRO rule, so you can add your own steps after it.

Then: steps after saving

Steps run after the file is saved, in order. Click Add a step…, find the step and click Add.

Say Acme sends Word documents and you want PDFs. Add the Convert documents step, click Add… and choose the conversion. Tick Delete the originals after converting them if you only want the PDFs.

The Convert documents step in the Then part of a rule, with the Add, Edit and Remove buttons
A Convert documents step under “Then”.

Other steps move or delete the email on the server, upload to the cloud, add a spreadsheet row and much more. Some steps need PRO Rules Server: PRO Rules Client converts to PDF only, and sending email, unzipping, databases and scripts are Server steps. See chained rules and actions.

Test and save the rule

Click Test this rule… to try it on emails you pick. Nothing is changed: files go to a temporary folder, and steps such as moving, deleting or sending are not done. Then click Save. That’s your first rule.

Make as many rules as you need, each with its own conditions, folders and steps. Before the first real run, use Rule settings › Test all rules… to see which rule saves each file, and Check rule order… to find rules that never save anything because a rule above them takes their files.

Points to remember

  • Rules run for each attachment, and for the email itself when a rule saves it.
  • A rule without an Account condition runs for every account.
  • Rules run from the top down. The first rule that matches a file saves it, and the rules below don’t see that file.
  • Steps under Then run after a file is saved. Steps under If something fails run when a step above fails.
  • Using the service? After changing a rule, click Reinstall… on Schedule › Service schedule.
  • Don’t want to build a rule by hand? Describe it to the AI Assistant and it writes the rule for you to check.

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 or suggestions about this post? Contact us.