Closed godtrack closed 2 years ago
This is my original email 高考前一天,沅江市政府领导到考点开展考前督查.eml.txt
I found a solution in the official documentation.
https://docs.microsoft.com/zh-cn/exchange/client-developer/web-service-reference/internetmessageheader
ExtendedPropertyDefinition PR_TRANSPORT_MESSAGE_HEADERS = new ExtendedPropertyDefinition(0x007D, MapiPropertyType.String);
service.loadPropertiesForItems(findResults, new PropertySet(BasePropertySet.FirstClassProperties, PR_TRANSPORT_MESSAGE_HEADERS));
ExtendedPropertyCollection extendedProperties = item.getExtendedProperties();
OutParam<String> outParam = new OutParam<>();
extendedProperties.tryGetValue(String.class, PR_TRANSPORT_MESSAGE_HEADERS, outParam);
String param = outParam.getParam();
This contains all the attributes of the mail
I can find it in eml file, but I can't find it through EWS, why?
service.loadPropertiesForItems(results, PropertySet.FirstClassProperties);
InternetMessageHeader internetMessageHeader = item.getInternetMessageHeaders().find("Resent-From");
internetMessageHeader is null