Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.36 KB

README.md

File metadata and controls

58 lines (44 loc) · 1.36 KB

Mail Downloader

Go Report Card

Download attachments and mails as pdf through useful filters. Years later, this tool is still a thing. I use it every month to download all my invoices from my mail accounts since years.

preview

Requirements

Usage

make build
./mail-downloader -config=config.yml -from="2019-10-01" -to="2019-12-31"

Config

imap:
  username: [email protected]
  password: secret
  server: imap.gmail.com
  port: 993

attachments:
  mimetypes:
    - application/pdf

mails:
  subjects: # subject contains
    - invoice, amazon # invoice AND amazon
    - rechnung # OR rechnung
    - receipt # OR receipt

Output

files
├── [email protected]
    ├── December-2019
    │   ├── marketplace.amazon.de
    │   │   │── invoice.pdf
    │   ├── iconfinder.com
    │       │── invoice.pdf
    │       │── invoice-2.pdf
    │       │── mail-123.pdf
    │
    ├── November -2019
        ├── facebook.com
            │── invoice.pdf