• Mail Server (Access XP)

    Author
    Topic
    #407514

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #853227

      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:

      Re: Mail via Lotus Notes (Access 2000/xp)

      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

      • #853382

        Thanks Mark

        • #853399

          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

          • #853407

            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.

            • #855071

              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

            • #855072

              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

          • #853408

            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.

        • #853400

          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

      • #853383

        Thanks Mark

    • #853228

      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:

      Re: Mail via Lotus Notes (Access 2000/xp)

      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

    Viewing 1 reply thread
    Reply To: Mail Server (Access XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: