A bit more information, msg.get("subject", "unknown") does return a string, as follows:-
Subject: =?utf-8?Q?aka_Marne_=C3=A0_la_Sa=C3=B4ne_(Waterways_Continental_Europe)?= So it's the 'searchTxt in msg.get("subject", "unknown")' that's failing. I.e. for some reason 'in' isn't working when the searched string has utf-8 characters. Surely there's a way to handle this. -- Chris Green ยท -- https://mail.python.org/mailman/listinfo/python-list