An open API service indexing awesome lists of open source software.

https://github.com/loeffel-io/mail-downloader

IMAP Mail Downloader - Download attachments and mails as pdf with useful filters
https://github.com/loeffel-io/mail-downloader

downloader mail

Last synced: about 1 month ago
JSON representation

IMAP Mail Downloader - Download attachments and mails as pdf with useful filters

Awesome Lists containing this project

README

        

# Mail Downloader

[![Go Report Card](https://goreportcard.com/badge/github.com/loeffel-io/mail-downloader)](https://goreportcard.com/report/github.com/loeffel-io/mail-downloader)

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

- [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html)

### Usage

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

### Config

```yaml
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

```text
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
```