Finding the SMTP server name

Is there any way to detect a machine's SMTP server name automatically either
through Win API functions or Registry. I am using Microsoft Outlook Express
v5.0 and I found an entry in the Windows Registry as follows

HKEY_CURRENT_USER\Software\Microsoft\Internet Account
Manager\Accounts\00000002\SMTP Server

Is this the same for all email clients?

LVL 1
sivaramyAsked:
Who is Participating?
 
jhanceConnect With a Mentor Commented:
The location of the SMTP server name depends on the EMAIL client in use.  Outlook Express does indeed store it in the registry as you have shown above.  Other mail programs use different locations.  Eudora, for example, stores it in it's own INI file.  Netscape Navigator Mail uses it's prefs.js javascript setup file to store it.  Others do it in the registry but not in the same place as Outlook Express.

Since SMTP is not a standard MS Windows service setting, there is no standard way of detecting it.
0
 
sivaramyAuthor Commented:
It is disappointing to know that there is no direct way.

Any way Thank you very much for your help.
0
All Courses

From novice to tech pro — start learning today.