问题 - 我应该使用 SPItemReceiver 还是 SPEmailEventReceiver
我有自定义的 SharePoint 文档库,用于将电子表格数据上传到数据库中。上传电子表格时,SPItemReceiver 会触发并上传数据。 现在,我想向文档库添加传入电子邮件功能。
我的问题是......文档库通过电子邮件收到电子表格后。我应该使用 SPEmailEventReceiver 的可重写方法 EmailReceived 来处理电子表格中的数据还是仍然使用 SPItemReceiver?
我想我可以使用其中任何一个,但我想知道您的意见哪个更好以及为什么。
提前致谢
I have custom SharePoint Document Library which I use to upload spreadsheet data into a database. When a spreadsheet is uploaded, the SPItemReceiver triggers, and upload the data.
Now, I would like to add an incoming email feature to the document library.
My question is...after the document library has received the spreadsheet by email. Should I use the override-able method EmailReceived of the SPEmailEventReceiver to process the data in the spreadsheet or still use the SPItemReceiver?
I gather I could use either, but I would like to know your opinion which is better and why.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用
SPEmailEventReceiver
来处理数据。这将使您轻松维护代码和调试。下面是处理数据的示例代码。在此代码本身中,您可以包含将数据上传到数据库的代码。You should use
SPEmailEventReceiver
to process the data. This will make it easy for you to maintain your code and debug. Below is the sample code to process the data. In this code itself, you can include the code to upload the data into database.