Results 1 to 6 of 6
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Mail Server (Access XP)

    I had noticed that MarkD had shown a way to determine which Mail Server resides on the PC. I cannot to find it.
    What I want to do is to test what Mail Server resides on the PC the user is operating on, either OutLook or Lotus Notes.

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Mail Server (Access XP)

    Do you which email client (or clients) resides on user's system? Don't think many users have an email server residing on system. Unless you mean an application like Outlook that can function as an Automation "server" (ie, send messages from another application like Access). Anyway, my previous post:

    <!post=Re: Mail via Lotus Notes (Access 2000/xp),352606>Re: Mail via Lotus Notes (Access 2000/xp)<!/post>

    addressed issue of determining the default email client on a given system. It should be noted (eluded me at time) that in Windows XP, the default email client may be set on a per-user basis; this was not provided for in earlier versions of Windows. See MSKB 297878:

    How to Register an Internet Browser or E-mail Client With the Windows XP Start Menu

    Brief quote: "Windows XP also extends the existing definition of mail clients to permit registration on a per-user basis. On previous versions of Windows, the default mail client is a system-wide setting." And: "NOTE: The default installation of Windows XP does not register a per-user default Internet or e-mail program, only a system-wide default." So if you are trying to determine default email client on WIN XP system, you need to take this into account. My recommendation would be, first test HKCU, if key not found, then test HKLM. MSKB article also notes:

    "Underneath [HKLMSoftwareClientsMail] may be zero or more subkeys, one for each registered email application. For
    example, a hypothetical system might have:

    [HKLMSoftwareClientsMailEudora]
    [HKLMSoftwareClientsMailOutlook Express]
    [HKLMSoftwareClientsMailHotMail]"

    You can use Windows RegEnumKey API function to enumerate the subkeys under a given key. See attached text file for sample code. The TestGetMailClientSubkeys() sub will return the HKLMSoftwareClientsMail subkeys as a delimited text string (or as an array). This can be used to determine if Lotus Notes is installed on target PC. For this purpose you should only need to test HKLM keys. Test results (work system):

    ' text string:
    Hotmail;Microsoft Outlook;Outlook Express

    ' array:
    0 Hotmail
    1 Microsoft Outlook
    2 Outlook Express

    You'd have to test on system with Lotus Notes installed to determine correct test string for Lotus.

    HTH
    Attached Files Attached Files

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Mail Server (Access XP)

    Thanks Mark

  4. #4
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Mail Server (Access XP)

    PS - Here is modified version of text file previously posted (exported code module) - includes several addition functions for retrieving info from Registry. Includes GetDefaultMailClient() function to simplify getting the default email client on user's system - will work in Windows XP or earlier (if no user-specified default found, checks system settings). For example on my home pc (Win XP) do not have user-specific default specified - function test results:

    ? GetDefaultMailClient
    Outlook Express

    This may be useful if you need to know the default client. Use TestGetMailClientSubkeys() as noted previously to get list of all installed email clients on local machine.

    HTH
    Attached Files Attached Files

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Mail Server (Access XP)

    You are a great source of knowledge Mark, thanks for your time and effort.

    I have decided your earlier code version that uses GetRegValString. I have not tried this at the Client site yet, it should be interesting what it returns in a Lotus Notes environment.

    Again, thanks.

  6. #6
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Emerald Beach, New South Wales, Australia
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Server (Access XP)

    In a XP & notes environment I get

    ?GetDefaultMailClient()
    Outlook Express

    call TestGetMailClientSubkeys

    Hotmail;Lotus Notes;Outlook Express

    0 Hotmail
    1 Lotus Notes
    2 Outlook Express

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •