
Monitor the folder for new arrivals and print themįor the first step, you could use a free product such as.Download attachments from new emails to a folder.You may use a two-step solution if the email server uses IMAP: It is also important, the script and the extracted files are not located on a network drive! Please note the missing quotes in the run in field, otherwise the script won't run. program/script: "C:\Program Files (x86)\Python36-32\pythonw.exe".To overcome this, a scheduled task (action: run program) is helpful, executed every 10 minutes or so.
#OPEN SORCE MAIL ATTACHMENT DOWNLOADER PDF#
However, this can result in multiple printing of extracted pdf files if the filter finds more than one email. In principle, the print.pyw file can be run with Filtaquilla. Proc = subprocess.Popen(command, stdout=subprocess.PIPE) Pdf_files = glob.glob(script_dir + "/*.pdf") Script_dir = os.path.dirname(os.path.realpath(_file_)) Place the following print.pyw in C:\invoices: import osįoxit = "C:\Program Files (x86)\Foxit Software\Foxit Reader\FoxitReader.exe" Extraction of attachments is not enabled per default in Filtaquilla - be sure to check the settings of Filtaquilla. Filtaquilla extracts all attachments to a specified folder ( C:\invoices). Emails are moved to an IMAP subfolder (as an archive for later inspection if anything went wrong). Filtering for email sender and subject provides enough "security" for now. A scheduled task to run the python script on a regular basis.Īll emails are filtered in Thunderbird with Filtaquilla (available for Thunderbird 52.0-60.* as of 2019).Other tools, such as AdobeReader or Ghostscript are not capable of silent printing - a window is visible for AdobeReader for quite a while and even for Ghostscript, a window is popping up. A python script to print the files through FoxitReader.



Open source solution, thus also available for commercial backgrounds.Here is my solution to the problem, combining some aspects of the other answers and overcoming limitations of those.
