Mail Attachment Downloader lets you bulk download attachments, bulk download emails and archive or save them as eml, pdf, docx, tiff and more.
Saving emails and email attachments has never been easier. We offer a FREE version available on our website and also a PRO version that has additional capabilities that the FREE version does not.
Mail Attachment Downloader is NOT dependent on any installed email client such as Outlook and can work independently on a server if need be.
The FREE version lets you bulk download email attachments. The PRO version lets you bulk download both email attachments and emails (in .eml format or .txt or .html formats or .pdf or .docx or a .tiff multipage image).
Create a new rule filter by going to the Global Filters tab and clicking on Add a new filter.
Type in the rule name for the new filter.
In the Save area, check the Save as .eml checkbox as shown
Bulk download emails
This will bulk download emailsas .eml files to the save folder.
In addition to the above, you can create many rules to only save certain .eml files like those that match a certain FROM email or a certain SUBJECT each out to different folders by creating a rule per save location.
Save emails and email attachments as PDF, DOCX or TIFF
If you want to have this .eml saved to a different format like PDF or DOCX or a multipage TIFF (the PRO Server supports over 50+ file formats), do the following:
In the Actions after save section, click on Add action -> Document conversion
Select the Document conversion entry if not already selected and click the Add conversion button
archive emails
Select the From type as Any doc and the To type as PDF or TIFF or DOCX.
That’s it!
Now you have emails being saved to PDF or any other format as desired.
If you want only the .eml to be saved without the attachments, you can add a Filename filter and specify ‘.eml’ in the filter text box. This will only download the .eml’s without downloading the attachments separately.
With the PRO Server version you can run the above setup24×7 as a Windows Service and not have to worry about opening up the program every time you need to bulk download emails.
If you have any questions, please feel free to contact us.
Further reading
Some interesting how-to links and posts for further exploration:
Automate sending emails easily now with Mail Attachment Downloader PRO Server. Email processing after downloading your emails or attachments has never been easier.
To set this up, follow these simple steps:
in the Actions after save section (second half of the screenshot below), click on the Add button dropdown and then choose Send email
Then pick the Account (you must have enabled the Outgoing mail server in the settings first) and Attachment options. The Attachment options enable you to either choose to not attach any files or attach a file from the previous parent action or attach all files that have been saved for this email thus far.
You can specify any fields in the various sections of the email (like To, Subject or Body to name a few). That is, you can use the extracted Subject from the email as the Subject here by just putting in {SUBJECT}.
Or if you want to auto-respond to the sender you can put the To as {EMAIL_FROM} or an extracted field from the Rule filters and extraction section.
You can choose to also pick the importance of the email as high priority if necessary.
Moreover the body of the email could be just plain text or a HTML source that you may have edited outside the program.
That’s it you have now automated sending emails using the program!
Setup email actions such as unzipping an email attachment, converting the email attachment to pdf and running a script easily with Mail Attachment Downloader PRO Server.
This post will show you how to setup a rule to Unzip a file, then convert the unzipped .docx or decrypt a .pdf and then run a script.
In the Actions section, do the following:
Select ‘After saving attachment‘ from the tree view on the left. Note that even though this says ‘After saving attachment‘, you can run actions on the body of the email as well which will be downloaded as an attachment when you click on the ‘Save email text’ checkbox.
Click on Add button -> After saving attachment -> Unzip files and select any options as shown below. You can enter which specific files you want to unzip in the box which can also include wildcards or regular expressions. If you have multiple, separate each file or wildcard by a new line.
Select Unzip files from the tree view on the left. This is necessary to create a sub action under unzip files so every unzipped file runs the remaining action. You can also specify which files to unzip in the previous step. Now click on Add -> After saving attachment -> Document conversion. Fill in the conversion details by clicking on the Add Conversion button. Note: You can also choose to decrypt the unzipped file if the source file was a PDF by providing the password to decrypt the file.
Select Document conversion from the tree view on the left. Then Add -> After saving attachment -> Run command line. Enter details to run a command line. In this case we are running a .bat file with the filename of the converted file – {FILENAMEEXT} in the screenshot below now represents the converted filename now from the previous step and not the original saved filename.
That’s it.
If you have questions or need additional actions, please contact us and we can help assess feasibility.
When using invoice processing software, there are cases where you want to download emails and email attachments to a folder in a specific format so the invoice processing software can pick them up.
There are two paths to solving this today. One approach make use of solutions that require you to have an email client installed and offer limited functionality. Then there are tools that are more complex taking months to configure, test and deploy.
Mail Attachment Downloader PRO Server offers a sweet spot by offering flexible tooling for this purpose whilst making it easy to customize it for your specific needs. As you read on, we’ll show how this product can do more than just saving attachments to a folder or a share if your business needs it.
Let’s consider the case where you receive many invoices via email with (or without) attachments that then need to be saved for later consumption by invoice processing software.
Once the data is saved in a folder or share, you can either have the PRO Server save the invoice details into specific database fields OR run a custom script to hand it off to your line-of-business application OR have the invoice processing software monitor the folder and pick up the invoices and process them through the workflow. Also, the share could serve as a secondary backup for your invoices you’ve received.
You can also configure the program to save not only the invoices, but the email textor body as well very easily by just clicking on the ‘Save email text’ or ‘Save as .eml’ checkbox in the Rule filter screen (see below screenshots). This could come in handy if the invoice is in the body of the email itself (no attachment in the email, that is).
Also, let’s say that the Subject of that email is something like “Your Invoice #853290 is ready“. And we want to store this attachment under the folder of the Invoice # and use the filename that was sent prefixed by who it was From (from email address).
We will use the Mail Attachment Downloader PRO Server version prior to submitting the data to our invoice processing software that enables a LOT MORE flexibility in how you want the attachment named via a template mechanism as will be shown below.
Create a Rule Filter
First, since the PRO Server version lets you create many filters, let’s create one filter for Invoices.
Click on the Global Filters tab and the Add new filter button as shown below.
Enter the Rule filter name as something meaningful, we’ve called it ‘Invoices‘ as shown below.
Filter by SUBJECT
Second, since we want to only look at emails with a subject that contains the Invoice #, we need to add a filter to look for those emails. Click on the Add dropdown arrow -> Filters -> Header: Subject as shown below.
Since we know the format of the subject at-least has “Invoice #” we are going to first include that.
Extract the Invoice # from the SUBJECT
Third, since we want to extract the Invoice # for further invoice processing.
With this post we will explore extracting data for invoices from the email using regular expressions. In a future post, we can walk you through how to use the Extraction Wizard if needed.
Since the Invoice # is in the Subject of the email, we will add a new extraction to the new rule we created as follows. Click on the Add dropdown -> Extractions -> Regex Extraction.
Rename the Extraction field to something meaningful like “{INVOICE_NUMBER}” as shown below and include a regular expression to extract text.
In the Pattern field enter ^.*Invoice #(\d+)([a-z| ]*)$. If you notice symbols like ^, $ and \d and * are indicators to what to look for in the Subject. ^ implies start of the line and $ is the end of the line. The .* means include any number of characters followed by Invoice #. Since what follows Invoice # is a number we include (\d+). This becomes our first extraction field (which we will use as the Replace text). Following that could include any number of characters or spaces ([a-z]| ]*) followed by the end of the line $.
In the Replace textbox, specify $1 which is the first match between the parentheses () we have specified in the Pattern, in this case (\d+).
Feel free to contact support if you have a different pattern to look for and we can help you craft this as needed. Refer to the Microsoft’s regular expression reference here for more.
Then you can Test the result out as shown above, if you notice TEST SUCCESS includes our extracted Invoice #. This will save with the invoice number for invoice processing into the field name.
NOTE: As mentioned before, if you are not well versed with regular expressions, we recommend using the Extraction Wizard instead.
And lastly, we will enter the save filename format as shown below:
The INVOICE_NUMBER field is the invoice number we extracted from the Subject. After which we include a \ to indicate this is a folder and then EMAIL_FROM which is the email address followed by the FILENAME, the ID of the email and EXT for the extension.
Lastly, click the Save button which will save the rule out and then you are ready to try downloading a few attachments to see if the extractions worked as intended.
If you were wondering what other information you could include in the Save filename format field, click on the little ? button which will open up a help option for this as shown below. As you can see, there are very many options to choose from giving complete flexibility to you.
If you find something that is missing in the features above, let us know.
Run download actions after save
You can then use any of the extracted fields along with any email specific fields (such as {FROM}, {TO} etc.) in the numerous download actions that are supported. This includes saving the data out to a database, saving to a .csv metadata file and many more.
Once the data is saved in these folders, you can trigger the invoice processing software via a script (if you have the PRO Server, you can run a script after saving the file to a folder) or folder monitoring as needed.
Once this is complete, if you have the PRO Server version you can now install the above as a Windows Service and not have to worry about having to log in to the box to process these attachments.
The Mail Attachment Downloader Free version also enables you to do some of the above but has the following limited features:
For personal use only
ID of the email in the filename. We highly recommend keeping the ID in the filename as if this is removed it may result in duplicate filenames that may result in overwriting of the filename.
Fixed formatting of filename to include email headers are supported in a specific non-flexible format in the FREE version. The PRO versions include much more flexibility in how filenames are formatted as was shown above.
From like ‘From (Bran E. <bran@gearmage.com>)’
To like‘To (Atul <atul@gearmage.com>)’
Subject like ‘Subject (Our invoice)’
Date like ‘Date(Wed, 24 Feb 2016 21_44_15 -0800)’
The ability to create a folder based who the email is from.
The ability to create a folder for every mailbox folder eg. “Inbox”.
While this is great, it does not allow us to be more prescriptive about how we want to store the attachments. So if you need more flexibility you should get the PRO or the PRO Server versions.
Further reading
Some interesting how-to links and posts for further exploration:
When you run the server version you can run the program as a Windows Service that runs 24×7 unattended. Then just email the PDF as an attachment to your email and have Mail Attachment Downloader PRO Serverpick it up and automatically download/convert the file and save it in the way you want it.
Open Global filters tab and either click the Add new filter or Edit selected filter button
If you are creating a new rule, just enter a meaningful filter name.
Under Actions, click Add action and choose Document conversion. This will add a new action in the list to the left. Click on the Document conversion list item under After saving file. You will see the conversions that are configured on the right side.
Click on the Add conversion button.
In the From Type select Any doc and the To Type specify docx. Click OK.
Save the rule and that’s it!
Any email that you receive that has a PDF attachment (including some other related formats like LaTeX etc.) will be converted to DOCX.
If you receive encrypted PDF files, you can provide the decryption password in the PDF Decryption Password text box as can be seen in the screenshot in Step-5. You will need to do this before you can convert it to DOCX.
With the Mail Attachment Downloader PRO Server version, you can use it to convert emails (.eml or .msg or .txt or .html) and email attachments (text, html, word, excel, powerpoint and more) to over 50+ formats (bmp, csv, dif, doc, docm, docx, dot, dotm, dotx, emf, epub, excel, flatopc, flatopcmacroenabled, flatopctemplate, flatopctemplatemacroenabled, html, htmlfixed, jpeg, mhtml, mobixml, odp, ods, odt, openxps, ott, pdf, pdfnotes, png, potm, potx, pps, ppsm, ppsx, ppt, pptm, pptx, ps, rtf, spreadsheetml, svg, swf, tabdelimited, tex, text, tiff, tiffnotes, wordml, xamlfixed, xamlflow, xamlflowpack, xlam, xlsb, xlsm, xlsx, xltm, xltx, xml, xps)!
You can use this to convert from the following popular formats:
DOCX to PDF, PNG, JPEG, HTML and more
PDF to DOCX, PNG, JPEG, HTML and more
CSV, XLSX to PDF, PNG, JPEG, HTML and more
PPTX to PDF, PNG, JPEG, HTML and more
EML to PDF, DOCX, PNG, JPEG, HTML and more
JPEG, BMP, TIFF, images to PDF, DOCX, HTML and more
If you have any questions or suggestions, please contact support.
Create a new filter or edit an existing one in the Global Rule tab
Under Actions, click Add action and choose Document conversion. This will add a new action in the list to the left. Click on the Document conversion list item under After saving file. You will see the conversions that are configured on the right side.
Add a new document conversion by clicking the ‘Add conversion‘ button.
Pick the source format (From Type) and the destination format (To Type). If you are using the PRO Server, then you can pick any format in the To. Otherwise, you will be limited to just PDF.
Click OK
That’s it!
Now each document attachment (doc, docx, txt, html, rtf, eml etc.) will be converted to PDF or TIFF or any To Type you selected above.
If you want to also save the email body in addition to the attachments as PDF or TIFF, check the Save as .eml checkbox in the rule and the document conversion action (from Doc -> PDF or TIFF) will also convert the .eml file to PDF or TIFF. The .eml extension is considered a document for conversion purposes.
If you want to convert other types such as cells (xlsx etc.), slides (ppt etc.) or images (jpgs etc), you can repeat Step-3 to add the different From’s if you would like.
This will save each attachment as a separate PDF or TIFF files. Further below we show how you can saveemails and attachments as a single PDF. You can also save emails and attachments to a multi-page TIFF if required by following the same instructions except select tiff as the To type.
You may also choose to encrypt the PDF file by checking the ‘Encrypt PDF‘ checkbox if needed.
Save emails and attachments to a single PDF
To save emails and attachments as a single PDF, you will need the PRO Server version and the following setup:
Make sure Save as .eml is checked, this will save the email body.
Ensure Document Conversion action is added and includes conversions from various types to PDF as shown below. Check the delete source files after conversion checkbox.
The above will save the body and attachments all separately as PDF files. You can skip the next step if that’s all you want to do (save as separate files).
To merge them into a single PDF: Right click on Document Conversion and then add Merge PDF files action. Check the delete all source PDFs checkbox.
Merge PDFs
Now emails along with attachments will end up being a single PDF where the email is the first few pages and subsequent pages are the attachments rendered as PDFs.
Over 50+ Formats
If you get the Mail Attachment Downloader PRO Server version, you can use it to convert emails (.eml or .msg or .txt or .html) and email attachments (text, html, word, excel, powerpoint and more) to over 50+ formats (bmp, csv, dif, doc, docm, docx, dot, dotm, dotx, emf, epub, excel, flatopc, flatopcmacroenabled, flatopctemplate, flatopctemplatemacroenabled, html, htmlfixed, jpeg, mhtml, mobixml, odp, ods, odt, openxps, ott, pdf, pdfnotes, png, potm, potx, pps, ppsm, ppsx, ppt, pptm, pptx, ps, rtf, spreadsheetml, svg, swf, tabdelimited, tex, text, tiff, tiffnotes, wordml, xamlfixed, xamlflow, xamlflowpack, xlam, xlsb, xlsm, xlsx, xltm, xltx, xml, xps)!
You can use this to convert from the following popular formats:
DOCX to PDF, multi-page TIFF, PNG, JPEG, HTML and more
PDF to DOCX, multi-page TIFF, PNG, JPEG, HTML and more
CSV, XLSX to PDF, multi-page TIFF, PNG, JPEG, HTML and more
PPTX to PDF, multi-page TIFF, PNG, JPEG, HTML and more
EML to PDF, multi-page TIFF, DOCX, PNG, JPEG, HTML and more
JPEG, BMP, TIFF, images to PDF, DOCX, HTML and more
Further reading
Some interesting how-to links and posts for further exploration:
Save emails and attachments to a database (SQL Server)
In this post, we will explore saving emails and attachments to a database server like SQL Server by setting up an ODBC data source and using a post download Action to save contents of the email and/or attachments to a database.
The program supports and works with any compatible ODBC data source such as MySQL, Oracle, PostgreSQL and more. This post only explores setting up to save the data in SQL Server but also has information on how to tweak it for other database types.
Each rule can be setup to save emails to databases using either generated SQL (to one or more tables) or a custom SQL.
You do not need to know SQL to save emails or attachments to a database. And if you do know SQL, it offers the flexibility and customizability to modify the SQL statements to suit your needs.
You can even include extracted data from emails or attachments using custom variables in your SQL statement and save them to a database!
Each rule has several phases — first, search and filter through emails or attachments, then extract data from emails or attachments, saving email bodies or attachments to a customizable file or folder format if needed and lastly post-process the emails or attachments by saving them to a database of your choice.
Used by many Fortune 500 companies today to save emails and attachments to databases. Runs 24×7 in the cloud or on-premise as a Windows Service.
You get a versatile tool that provides flexibility in storing emails to databases in just the way you want to.
Step-by-step tutorial — emails to databases
Setting up a datasource
Let’s start off by adding a new data source — click on the Database tab -> Add ODBC source button
Provide a name for the source first. Then pick either the 32-bit ODBC driver or 62-bit ODBC driver (depending on whether you installed the 32-bit or 64-bit version of Mail Attachment Downloader PRO Client or PRO Server).In our case, the driver “SQL Server” from the drop down indicates the 32-bit driver. Then enter the Connection string that specifies how to connect to the server:Server=<computer name>\<SQL Server name>;Database=<DB name>;Trusted_Connection=yes;
An example of these filled in is shown below: Server=TESTPC\GEARMAGE;Database=TestDB;Trusted_Connection=yes;
Click Test Connection button to make sure this succeeds. Then click OK.
At this point a data source has been setup.
Rule configuration to save the email to a database
Then create a new rule or edit an existing rule from the Global filters tab.
Under Actions after save click Add action and then choose Save to database. This will add an action under After saving file in the list to the left. NOTE: The screenshot below shows other actions as well, if you have other actions you can chain or nest the save to database action after those actions have taken place as shown below.
Pick the Source as the one you provided in Step-2.
Specify a new table name (or an existing one) and then click “Create Table” if this is a new table and follow the prompts. At this point a new table schema would be created and the SQL would be automatically filled in based on the questions you answered.
Click “Test SQL” to test connectivity and table row creation, this will add a new row to the table to make sure everything is setup correctly.
Click the Save button to save the new rule with the Save to DB action.
Now you can click the Connect And Download button to test out the ability to save to DB.
That’s it!
You have setup the program to automatically save emails and attachments to a database.
IMPORTANT CONSIDERATIONS
Make sure you select either the 32-bit ODBC driver or the 64-bit ODBC driver in the dropdown depending on which installation of Mail Attachment Downloader PRO Client or PRO Server you installed (license email has links to both versions of the install). This is supported in all Windows versions including Windows 10. In some cases default installations may only install the 64-bit driver and you may need to manually download and install the 32-bit ODBC driver for your database. Please consult the database documentation and Google on how to do this.
Your specific connection string can vary depending on the type of database (for example, Oracle has different connection strings than MySQL). A useful site to help you with the ODBC connection string is https://www.connectionstrings.com. Make sure you only choose the ODBC connection string in the sitefor yourdatabase type (like Oracle). You may need to play around with the different strings and test connections to find the one that works. If your connection string includes a Driver name, make sure it matches exactly (space for space) the one you have picked in the dropdown.
Depending on the type of DB you use, the automatic creation of table/sql may fail. In that case, you might have to provision the schema for the table in the DB manually and then specify the SQL to insert records into the table in the program.
You can save the attachment content using the following variable in your SQL
{RAW_CONTENT}
Further reading
Some interesting how-to links and posts for further exploration: