Configure Outlook Mail Settings Programmatically?

北战南征 提交于 2020-01-02 10:27:27

问题


Was wondering if there was a simple way to add and configure a POP3 server to Outlook's mail server settings programmatically?

Searching Google seems to yield results that tell me I have to reverse-engineer the gobbledygook stored under HKCU\Software\Microsoft\Windows NT\Windows Messaging Subsystem\Profiles. My employer wanted to see if it was possible to quickly bang out a program to configure our users' POP3 settings (we're spread out around the country) and so far this is looking anything but simple.

I have VS2008 and all the Windows/Office built-in scripting tools at my disposal, though I don't know a lick of C++ (only C, C# and some web/linux stuff, I am self-taught).

Does anyone know of a simpler way to access Outlook's mail profiles in order to add to or tweak them?

Thanks!

Tom


回答1:


Outlook supports the PRF file as a means to add/configure mail accounts: http://technet.microsoft.com/en-us/library/cc179062(office.12).aspx

You could distribute the file itself to your users, or write a utility to create it and open it with Outlook.




回答2:


The easiest approach is to create an AutoIt script to perform the changes through the front end. That way you don't need to reverse engineer anything. It's usually the quickest and easiest approach to making a change. After the script is good to go, compile it and distribute it. Have the end users run the application and they're done.



来源:https://stackoverflow.com/questions/1556816/configure-outlook-mail-settings-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!