Using IMAP to receive emails, pdfplummer to check the invoices in the attachment, SMTP to send them to my accountant.
Using a lot of code from @Paramiao, https://github.com/paramiao/pyMail. This pyMail.py is sufficient for basic email scripting.
I added support for Chinese and updated old APIs.
main.py does:
- Goes over INBOX
- Collect the invoice(fapiao) using a temperary directory
- Archive emails with legit invoice (If target folder name accurate in credentials.conf)
- Plots a summary