1. Rolf Knaden
  2. PowerBuilder
  3. Friday, 11 June 2021 15:22 PM UTC

Hi.
When executing "mRet = mSes.mailLogon(mailNewSession!)" on a client, where no mail client is installed, this message appears:
=>Screenshot 2021-06-10 153238.png

Whereas on a machine with a mail client installed, I am able to select a profile:
=>Screenshot 2021-06-11 170350.png

My question:
How does "mSes.mailLogon()" decide, whether there is a mail client or not?
I presume it looks into the registry!? Can someone give a hint which entry it looks for?

Thank you and best regards.

Rolf

Attachments (2)
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 11 June 2021 16:06 PM UTC
  2. PowerBuilder
  3. # 1

Hi Rolf,

It's not only whether an email client has been installed, but also if an email client has been setup as the default application to handle email.

I've googled on this, but the results are not very satisfying.

The best you could do, is to export your registry. Then change the default of your email client, let's say thunderbird, export again and compare the two exports to know where this stuff is located in the registry.

regards.

 

Comment
  1. Rolf Knaden
  2. Monday, 14 June 2021 12:13 PM UTC
Hi Miguel.

I can't agree. I did the comparison of two registry-exports already and located the default-entry as 'HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\mailto\UserChoice'.

But even, if you don't select a default email-client but you have outlook installed, then mail_logon() recognizes outlook and presents the profile-selection.

John Fauss gave me a hint (see above) to look at ''HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail''. That's the solution!

Thanks and best regards,

Rolf
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 14 June 2021 12:22 PM UTC
hi Rolf,

Could be you're right, maybe for Mapi. We use OLE with which we have experienced the problem for years. Maybe now things have improved with 365.

Anyway glad you found the correct entry!

regards.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 11 June 2021 16:09 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Rolf -

I'm not 100% sure, but since the PB mail-related objects use MAPI, maybe here:

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail

The default value at this key should name the default mail client (mine says, "Microsoft Outlook", for example).

Here's a link where I found this information:

https://docs.microsoft.com/en-us/previous-versions/windows/desktop/windowsmapi/mapi32-dll-stub-registry-settings

Best regards,
John

Comment
  1. Rolf Knaden
  2. Monday, 14 June 2021 12:11 PM UTC
Hi John.

Thank's for hint to 'HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail'. That works.

Best regards,

Rolf
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.