Doberman
Doberman

Reputation: 147

How to configure Outlook account via C#?

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

Upvotes: 5

Views: 4945

Answers (1)

nicholas
nicholas

Reputation: 3047

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

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

outlook.exe /importprf C:\SomePath\FileName.prf

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

Upvotes: 4

Related Questions