当前位置: 首页 > news >正文

做网站用新域名还是老域名保定百度推广优化排名

做网站用新域名还是老域名,保定百度推广优化排名,柳州关键词优化网站,品牌营销策划成功案例本文将使 C# 开发人员能够以编程方式将EML或MSG转换为其他流行的文件格式。Aspose.Email 提供了类和方法以及在线 电子邮件转换器工具,可将 EML无缝转换为PNG 。如果不安装第三方软件,则无法打开 EML/MSG 文件。因此,将 EML/MSG 转换为 PNG 和…

本文将使 C# 开发人员能够以编程方式将EML或MSG转换为其他流行的文件格式。Aspose.Email 提供了类和方法以及在线 电子邮件转换器工具,可将 EML无缝转换为PNG 。如果不安装第三方软件,则无法打开 EML/MSG 文件。因此,将 EML/MSG 转换为 PNG 和JPG等图像文件格式将允许您轻松查看这些文件。因此,在本指南中,我们将通过一段代码片段来使用C#构建电子邮件转换软件。在继续之前,请确保您有源EML和MSG文件来实现该功能。

Aspose.Email 是用于轻松的开发 email 功能的应用程序的一组控件,基于  ASP.NET 的Web应用、Web服务和Windows 应用。支持 Outlook PST, EML, MSG, and MHT 格式. 允许开发者直接与 SMTP, POP, FTP, 和 MS Exchange 服务器进行工作。支持邮件合并、行事历、定制邮件标题和内容、嵌入文件等,Aspose API支持流行文件格式处理,并允许将各类文档导出或转换为固定布局文件格式和最常用的图像/多媒体格式。

Aspose.Email 最新下载(qun:666790229)icon-default.png?t=N7T8https://www.evget.com/product/3081/download

电子邮件 API 集成和安装

要安装此企业级 .NET 库,请在NuGet包管理器中运行以下命令或在此处下载 DLL 文件。

Install-Package Aspose.Email

除了Aspose.Email for .NET之外,您还需要安装Aspose.Words for .NET API。

Install-Package Aspose.Words

Aspose.Email for .NET为开发人员提供了完整的安装指南。此外,安装需要几秒钟,您就可以开始使用 API 将EML 转换为 PNG 或 MSG 转换为 PNG

电子邮件 API 集成

C# 中的 EML 到 PNG 转换

现在,我们可以编写一个代码示例,以编程方式用 C# 构建电子邮件转换器工具。

以下步骤展示了如何构建电子邮件转换软件以将 EML 转换为 PNG

  • 创建EmlLoadOptions类的对象,该对象将用于从 EML 格式加载 MailMessage。
  • 设置RemoveSignature属性的值以指示加载时是否删除签名。
  • 调用MailMessage类的Load方法来加载源 EML 文件。
  • 设置消息的敏感度。
  • 设置消息的优先级。
  • 实例化MemoryStream类的实例。
  • 将 EML 转换为 MHTML 并通过调用Save方法保存到流。
  • 调用Position属性并设置流中的当前位置。
  • 使用 MHTML 流初始化Document类的实例。
  • 通过调用Save方法将文档保存为 PNG 图像。

以下代码片段在 C# 中将 EML 转换为 PNG

using Aspose.Email;
using Aspose.Words;namespace Aspose.Email
{
class EMLtoPNG
{
// Email conversion software for C# Developers - EML to PNG
static void Main(string[] args)
{string dataDir = "/sample-files/";
// Create an object of the EmlLoadOptions class that will be used to load MailMessage from EML format.
EmlLoadOptions emlLoadOptions = new EmlLoadOptions();
// Set a value of RemoveSignature property to indicate whether signature will be removed while loading.
emlLoadOptions.RemoveSignature = false;
// Invoke the Load method of the MailMessage class to load the source eml file.
MailMessage msg = MailMessage.Load(dataDir + "sample.eml", emlLoadOptions);
// Set the Sensitivity of the message.
msg.Sensitivity = MailSensitivity.Normal;
// Set the Priority of the message.
msg.Priority = MailPriority.High;
// Instantiate an instance of the MemoryStream class.
MemoryStream msgStream = new MemoryStream();
// Convert EML to MHTML and save to stream by calling the Save method.
msg.Save(msgStream, SaveOptions.DefaultMhtml);
// Invoke the Position property and set the current position within the stream.
msgStream.Position = 0;
// Initialize an instance of the Document class with the MHTML stream.
Document msgDocument = new Document(msgStream);
// Save the document as PNG image by calling the Save method.
msgDocument.Save(dataDir + "Outlook-Aspose_out.png", SaveFormat.Png);
}
}
}

您可以在下图中看到输出:

eml 转 png

以编程方式将 MSG 转换为 PNG

同样,您可以通过在上面的代码片段中进行以下更改来将MSG 转换为 PNG :

  • 创建MsgLoadOptions类的对象并将其作为参数传递到MailMessage类的Load方法中以加载源 MSG 文件。

以下代码示例演示了如何在.NET中将MSG转换为PNG:

using Aspose.Email;
using Aspose.Words;namespace Aspose.Email
{
class MSGtoPNG
{
// Email conversion software for C# Developers - MSG to PNG
static void Main(string[] args)
{string dataDir = "/sample-files/";
// Create an object of the MsgLoadOptions class that will be used to load MailMessage from MSG format.
MsgLoadOptions msgLoadOptions = new MsgLoadOptions();
// Set a value of RemoveSignature property to indicate whether signature will be removed while loading.
msgLoadOptions.RemoveSignature = false;
// Invoke the Load method of the MailMessage class to load the source MSG file.
MailMessage msg = MailMessage.Load(dataDir + "sample.msg", msgLoadOptions);
// Set the Sensitivity of the message.
msg.Sensitivity = MailSensitivity.Normal;
// Set the Priority of the message.
msg.Priority = MailPriority.High;
// Instantiate an instance of the MemoryStream class.
MemoryStream msgStream = new MemoryStream();
// Convert MSG to MHTML and save to stream by calling the Save method.
msg.Save(msgStream, SaveOptions.DefaultMhtml);
// Invoke the Position property and set the current position within the stream.
msgStream.Position = 0;
// Initialize an instance of the Document class with the MHTML stream.
Document msgDocument = new Document(msgStream);
// Save the document as PNG image by calling the Save method.
msgDocument.Save(dataDir + "Outlook-Aspose_out.png", SaveFormat.Png);
}
}
}

免费电子邮件转换器 - 现场演示

我们学习了如何为 C# 开发人员开发电子邮件转换软件。这里有一个在线工具,可以在线将 EML 转换为 PNG。它由Aspose.Email提供支持。此外,此电子邮件转换器工具是基于网络的,并具有用户友好的界面,您也可以在手机上使用此电子邮件转换器。最重要的是,它是免费的,您在使用它之前不需要进行任何订阅。

免费电子邮件转换器

结论

我们在此结束这篇博文,希望本文对您有所帮助。我们已经了解了如何使用Aspose.Email for .NET在 C# 中构建电子邮件转换软件。此外,我们探索了一个在线电子邮件转换器工具,可以在线将 EML 转换为 PNG。

http://www.shuangfujiaoyu.com/news/9257.html

相关文章:

  • 新疆建设兵团一师网站东莞关键词排名快速优化
  • 建一个大网站需要的时间网络营销师证书怎么考
  • 用py做网站信息流优化师培训
  • 网站建设术语解释提高工作效率英语
  • 河南做网站哪个公司好百度网页游戏大厅
  • 小鱼儿企业网站管理系统如何做好企业推广
  • 沧州做网站平台运营推广方案
  • 有免费建站的网站吗搜索引擎营销的主要模式
  • 做曖視頻网站电商平台运营方案思路
  • 网页设计素材的制作与收集处理事件seo软件
  • 网站建设工作 方案沈阳高端关键词优化
  • 公司网站建设模块百度推广计划
  • 网站如何做团购社交媒体营销三种方式
  • 如何查找网站所有页面品牌网络推广外包
  • 西安网站seo价格营销推广app
  • 公司网站主页设计图片重庆seo公司排名
  • vb.net做网站教程怎么弄一个自己的链接
  • 建盏公司官方网站友链交换网站源码
  • 内部劵网站怎么做沈阳专业seo
  • 推广代理登录页面seo优化工具有哪些
  • 一个空间可以做几个网站吗怎么弄一个网站平台
  • 注册规划师好考吗廊坊seo排名外包
  • 上海手机网站开发价格seo网站关键词排名提升
  • 建设网站的规划书微软优化大师
  • html5微网站demo百度手机版
  • 移动端网站开发 float网络营销的基本特征有哪七个
  • 苏州网站开发公司招聘软文营销的三个层面
  • 做推广比较好的网站好用的视频播放器app
  • 网站设计行业现状产品营销推广
  • 网站3网合一是怎么做的天津seo方案