Send Voting Email

百般思念 提交于 2020-01-30 05:01:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!