如何通过 C# 配置 Outlook 帐户? [英] How to configure Outlook account via C#?

查看:37
本文介绍了如何通过 C# 配置 Outlook 帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要通过c#配置email、name、邮件服务器等.如何在不使用 Outlook Redemption 的情况下执行此操作?

Need to configure email, name, mail server and other by c#. How do I do this without using Outlook Redemption?

推荐答案

一、创建 PRF 文件 - 通过您的 .NET 应用程序手动或动态创建.

First, create a PRF file - either manually or dynamically via your .NET application.

然后,要导入您使用命令行选项启动 Outlook 的帐户:

Then, to import the account you launch Outlook with the command line option:

outlook.exe /importprf C:SomePathFileName.prf

这可以在您的 C# 代码中使用 System.Diagnostics.Process 类来完成.

This can be done within your C# code using the System.Diagnostics.Process class.

这篇关于如何通过 C# 配置 Outlook 帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆