Basically I want to read all new emails from an inbox and put them in a database. The reason I use python is because it has imaplib, but I know nothing about it
Turns out it's quite easy. Even though all documentation points to the glorious past when the unicode function still was a real thing, 'str' does the same.
So to recap, you have to pass 'decode=True' with 'getPayload' and wrap that around a str(...,'utf-8').