简体   繁体   English

在Javascript或C#中从Office 365 Outlook加载项创建.msg文件

[英]Create .msg file from Office 365 Outlook add-in in Javascript or C#

I'm developing an Office 365 Outlook add-in and I would like to save any mail in .msg file. 我正在开发Office 365 Outlook加载项,我想将任何邮件保存在.msg文件中。

So far, I read this reference : https://dev.outlook.com/reference/add-ins/ and didn't find anything that allow me to create .msg file from a mail, in Javascript. 到目前为止,我读到了这个引用: https//dev.outlook.com/reference/add-ins/并且没有找到任何允许我通过Javascript从邮件创建.msg文件的内容。

Is it possible to generate a .msg file from javascript? 是否可以从javascript生成.msg文件?

I use a ASP.NET MVC Web Server (which will be on Azure later) in C# for executing the add-in, so I can use any C# package. 我在C#中使用ASP.NET MVC Web服务器(稍后将在Azure上)来执行加载项,因此我可以使用任何C#包。 I also can't pay for any plugin or library. 我也无法支付任何插件或库。

The Office.js library does not let you save the email as .msg format but you can still use the Exchange Web Service from your server to do the job for you. Office.js库不允许您将电子邮件另存为.msg格式,但仍可以使用服务器上的Exchange Web服务为您完成工作。

In this response , I explain how to use EWS library direct from the add-in or from the Web Server. 此响应中 ,我将解释如何直接从加载项或Web服务器使用EWS库。

In your case, I think it would be wiser to do the job on the server and benefit from the .NET EWS SDK rather than struggling locally with SOAP request from javascript. 在您的情况下,我认为在服务器上完成工作并从.NET EWS SDK中受益更为明智,而不是在本地使用来自javascript的SOAP请求。

The question how to save email to .msg using EWS has been answered here . 现在的问题是如何保存电子邮件使用EWS已回答到。味精在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM