Why did my rule not download the attachment or email?

This post will go over common troubleshooting steps to help you set up the correct email rules to get the behavior you want.

First off, this post only covers the PRO versions in depth. For the free version, refer to the free download page for instructions.

The assumption for the rest of this post is that you are using the global rules tab to setup the download.

So global filters are critical for the best use of the PRO Client and PRO Server versions. If you have not already setup global filters or rules, the recommendation is to do that as soon as possible.

Here are a few blog posts to help educate yourself about the PRO product and the use of global filters:

    1. IMPORTANT (READ THIS FIRST): Setup global filters for your email attachment processing. Learn about filters, extractions, save locations and actions inside a rule.
    2. If you work with multiple email accounts, learn how to set them up using global filters — multiple email accounts setup
    3. Configure the rules to save email bodies or attachments as PDF or other formats. 
    4. Understand the intricacies of setting up rules to extract data from emails or attachments. Then use that extracted data in actions.
    5. If you work with databases, learn how to save or read data from a database and use them in your actions.
Bookmark the tips and tricks page for tips on how to use the program.

Why did my rule not work?

To answer this and/or other questions like why the rule did not download the attachment or email, enable Rule Tracing.

The best way to troubleshoot any rule is to enable this new feature we have introduced called Rule Tracing. So rule tracing helps you  trace through what happened when a connect and download was initiated.

Rule tracing walks you through how the program decided to process the emails. It helps you understand which rules matched or did not match for every email or attachment that was processed!

Latest build

Only the latest build (v 3.2.1015 or later) has this new Rule Tracing functionality. So make sure you upgrade to this latest build.

Upgrading is easy. All settings are always preserved while upgrading.

NOTE for PRO Server users:  If you are running a service, uninstall the service from the Service tab first. Not doing this may interrupt the installation of the latest build.

  • Free instructions — If you are using the free version, just go to our website to get and install the latest build.
  • PRO instructions — If you are using the PRO versions, use the SAME link that you received in your license email to install the latest build. Your settings will be preserved with the upgrade.

How can you tell which build you are on?

To check the build you currently have, hover the mouse over the main title text (i.e. “Mail Attachment Downloader”) in the main program window.

version and build

You should see a popup with the version eg. 3.2 and the build 3.2.955.0 (955 is the build) as shown above.

How do you enable rule tracing?

It’s easy, just go to the Global filters tab and check the Rule Tracing checkbox (see the red text box highlight).

rule tracing

The search icon next to the Rule Tracing checkbox will not show anything until you run a Connect And Download session.

IMPORTANT: Before running a trace…

To make sure the program has a chance to process all email, do the following:

  • Uncheck the Exclude inline attachments checkbox inside every Global Rule that has the control enabled
  • Go to Global Filters tab -> Search in ->
    • Select Messages Since Last Download radio button if you are SURE there is new email that meets the criteria
    • Select All mail radio button to scan all email from the start of time. The program will then scan all email (this setting will apply for every account).
  • Check the Inline content button

Running a trace…

Once you have enabled rule tracing, you will need to run a connect and download to test it out.

But before we proceed, a little advice for PRO Server service users follows…

  • If you are running the PRO Server and a service, uninstall the service  first so you can troubleshoot the issue using a normal connect and download.
  • If you are having troubles with the service itself and the connect and download is working fine here’s what to do. The most likely cause for this is that you have not uninstalled and re-installed the service from within the program after changing some configuration. Config changes only take effect in the service after uninstalling and re-installing the service from within the program’s service tab.

Before running a connect and download, we recommend setting up the rules so you focus on the problematic email or attachment. To do so, you may need to disable certain rules (right click and disable them).

Or you may need to change the Search criteria (Search in… section) to All mail and alter the dates (Search between dates… section) when you want the program to process emails.

This way when you run the connect and download we won’t process all emails again but will just focus in on the specific email or attachment you want to troubleshoot.

Now click Connect and Download to initiate the trace and let it finish.

Analyzing the trace…

Once the connect and download has finished, switch back to the Global filters tab. Then click the Search button small search button next to the Rule Tracing checkbox.

This should bring up a popup window something to the effect of the below.

Email Attachment trace view

Now lets look at how to analyze the information presented in this window.

Step-1: Select the download session based on time shown that you want to analyze.

Trace view - step 1

Step-2: Select an email that should have downloaded emails or attachments or should have run rules or actions and you think there’s an issue with it.

Trace view - step 2

Step-3: Look at every part or attachment of the email and drill down into which rules ran and which rules matched or did not match and why.

Trace view - step 3

That’s it!

NOTE: Rules are run ordered from top to down (in the order they show up in the Global filters tab). So if a rule matched, no more rules under that rule will run.  You can change the ordering in the Global filters tab by dragging and moving a rule around.


With this you should be able to find out why one or more rules did not download any attachments. And then you should be able to tune the rule configurations to ensure that it does what you want it to do.

Save csv, excels to a database

If you have a need to save csv or excels to a database, you can automate it with ease with Mail Attachment Downloader PRO Server.

If you already receive these csvs or excels on email, then great we will show you how to save these to a database.

If not, you can email these csvs to an email address of your choice and have the program extract the attachment and automatically save it giving great power to you on-the-go.

Save csv, excels to a database

First ensure that you have a database connection configured as instructed here.

The next step is  to create a Global rule filter so we can first identify the email that contains the csv, excel. You can do so by adding a rule filter as shown earlier in this blog post. You can also specify a file type filter to choose .csv or .xls or .xlsx emails with filtering rules.

Once those are both done, saving the csv or excels to a database requires you to add an action.

  1. Click Add action -> choose Extract csv and save to DB and then click the Load sample file button to load a sample Excel or Csv file.csv to db - load sample
  2. Pick the sheet from the Choose sheet dropdown you want to load data from.csv to db - sheet
  3. Click the Load column names from sample file button. This will load the column names as cell id’s (eg. A1, B1 etc.).csv to db - load columns
  4. If your Excel/Csv starts from a header row (with header titles for each column), check the Starts from a header row and then click the Load column names from sample file again. This will auto-import the column names for easier manageability.csv to db - load columns with header row
  5. For each column you want to import, specify a field name within {} as shown below. By default all fields are imported as VARCHAR’s. If you want to change the type, you can also choose Extraction Wizard for this field to change the field type or manipulate data from the Csv if needed.Csv to db - field name
  6. Once all fields have been given a name within {}, click the Insert into database tab. Pick the DB source you have already configured and the table name you want the data inserted into.csv to db - table name
  7. Now specify the SQL including fields that you want inserted as shown.INSERT INTO {TABLE_NAME} (‘Sales description’, ‘Sales price’, ‘Sales quantity’) VALUES ({DESCRIPTION}, {PRICE}, {QUANTITY})csv to db - sql
  8. Now click the Test SQL using Sample File button. If everything is correct, then you should see something like the below. You can then look at the database to ensure that the rows from the Excel or CSV were inserted into the DB. csv to db - success

That’s it.

Now any emails matching the criteria would end up being added into the DB.

Further reading

Some interesting how-to links and posts for further exploration:

Contact us

Contact us if you have any questions, suggestions about the functionality described in this article.