问题
Using the Outlook API it is possible to send emails with polls by setting the VotingOpions property on a MailItem instance. Is it possible to do the same with Exchange Web Services in any way?
回答1:
Microsoft have published the format of voting emails, but Exchange Web Services does not provide an interface for them so you will need to roll your own. The data can be accessed via Extended Properties:
PidLidVerbStream:
new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Common,
0x00008520,
MapiPropertyType.Binary);
Is the voting options, a complicated binary structure that needs deconstructing. Although if you don't want to vary the options that get sent you can use Outlook to create the message, then extract the Extended Property and save the binary data you can use that to send the voting options again and again.
http://msdn.microsoft.com/en-us/library/cc839893(v=office.12).aspx has the nescessary links
PidLidVerbResponse:
new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Common,
0x00008524,
MapiPropertyType.String);
Much easier, just the string from the voting response that was selected, although the standard also requires a subject prefix with the response as well.
来源:https://stackoverflow.com/questions/3012883/send-voting-email