Question

I am using TIdIMAP4 component to fill the string grid with the messages of my GMail mailbox.

var IMAPClient: TIdIMAP4;

Some messages have German umlauts. When I call IMAPClient.RetrieveAllHeaders(MyMsgList) the string grid is populated as expected (all umlauts are displayed) but there are no UIDs however (I guess that RetrieveAllHeaders just doesn't fetch UIDs).

When I call IMAPClient.UIDRetrieveAllEnvelopes(MyMsgList) all additional attributes of a Messages are there, but the headers are displayed in abracadabra (=?ISO-8859-1?Q?_Die_Br=FCcke_von_Arnheim?=) // Shall be 'Die Brücke von Arnheim'.

I've read many supportive posts but could not find the answer why IndyIMAP4 treats German symbols incorrectly. Any ideas?

Was it helpful?

Solution

RetrieveAllHeaders() decodes the raw data it retrieves. UIDRetrieveAllEnvelopes() retrieves the raw data only, it does not decode. You can decode the raw headers manually by calling Indy's DecodeHeader() function in the IdCoderHeader unit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top