The function used for that 'iterator' should have the following signature 'bool operator()(QMailMessagePart &)', so I can know that the part exists, but not which part, unless I overlooked something :)